ok, ip address can check by visit google my ip address
i can compile my .java code and it is working, how the .java code become .apk file type please ?
Code:
import java.net.*;
import java.util.*;
import java.io.*;
public class HelloWorld{
public static void main(String []args){
try {
URL url = new URL("http://google.com");
URLConnection urlCon = url.openConnection();
InputStream inputStream = urlCon.getInputStream();
BufferedInputStream bf = new BufferedInputStream(inputStream) ;
BufferedReader r = new BufferedReader( new InputStreamReader(bf) );
//new InputStreamReader(bf, StandardCharsets.UTF_8));
String line ;
while ((line = r.readLine()) != null) {
System.out.println( line ) ;
}
} catch (MalformedURLException e) {
System.out.println("The specified URL is malformed: " + e.getMessage());
} catch (IOException e) {
System.out.println("An I/O error occurs: " + e.getMessage());
}
System.out.println("Hello World??");
}
}