URL의 처음 다섯 줄을 읽은 다음 역순으로 인쇄하는 간단한 프로그램을 작성하여 줄 5 줄이됩니다. 4, 3 호선, 2 호선, 라인 여기에 1URL의 첫 번째 5 줄 읽은 다음 역순으로 인쇄하십시오.
은 지금까지있어 무슨 :
public static void main(String[] arg) throws Exception {
BufferedReader keyboard;
String inputLine;
keyboard = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Please enter the name of a company (without spaces): ");
System.out.flush(); /* Make sure the line is printed immediately. */
inputLine = keyboard.readLine();
URL u = new URL("http://www." + inputLine + ".com/");
InputStream ins = u.openStream();
InputStreamReader isr = new InputStreamReader(ins);
BufferedReader readURL = new BufferedReader(isr);
가 난 할 노력하고있어 무엇을 할 수있는 가장 우아한 방법이 될 것이다?
왜 하시겠습니까? 종종 HTML 형식 또는 자바 스크립트 또는 CSS (대개 관련 정보가 아님)가 포함되어 있습니다. –