Alguem pode me indicar um metodo que passando um link p elee…ele retorna o codigo fonte?
[code]
import java.net.;
import java.util.;
public class Programa {
public static void main(String[] args) throws Exception {
URL u = new URL(“http://www.google.com”);
Scanner sc = new Scanner(u.openStream());
while (sc.hasNext()) System.out.println(sc.nextLine());
}
}[/code]