public static void main(String[] args) throws Exception {
URL oracle = new URL("http://www.example.com/example.php");
BufferedReader in = new BufferedReader(new InputStreamReader(oracle.openStream()));
String inputLine;
inputLine = in.readLine();
System.out.println(inputLine);
in.close();
}
I dont know too much Java and I am just trying to use the first line from a url as a string for a project.
so how can i use the variable "input line" in the same class but in another method that looks like this:
public void run(){//content}
i would appreciate any helpful answer. Thanks!