1. In the MainActivity.java file, add the below line to the imports section.
import java.net.HttpURLConnection
2. In the onCreate method, add the following line. This will declare a new HttpURLConnection named myHttpURLConnection.
HttpURLConnection myHttpURLConnection;
3. Compile and run!
3. Compile and run!
http://developer.android.com/reference/java/net/HttpURLConnection.html