Solved

Insert the Missing Code in the Following Code Fragment

Question 32

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions