Multiple Choice
Insert the missing code in the following code fragment. This fragment is intended to read a web page.
Public static void main(String[] args) throws IOException
{
String address = "http://horstmann.com/index.html";
URL pageLocation = new URL(address) ;
Scanner in = _________;
) . .
}
A) new Scanner("http://horstmann.com/index.html")
B) new Scanner(pageLocation)
C) new Scanner(new File(pageLocation) )
D) new Scanner(pageLocation.openStream() )
Correct Answer:

Verified
Correct Answer:
Verified
Q8: Your program will read in an existing
Q29: Which of the following statements about using
Q47: Consider the following code snippet. File inputFile
Q66: Which of the following statements about reading
Q72: Consider the following code snippet:<br>Try<br>{<br>PrintWriter outputFile =
Q83: Consider the following code snippet: File inputFile
Q89: Which of the following statements about reading
Q95: Which of the following is the correct
Q97: Insert the missing code in the following
Q101: The _ method of the Character class