Which of the following reads the textual contents of a URL and returns as a string?

Which of the following reads the textual contents of a URL and returns as a string?
A. spawn(f);
B. load(filename,…);
C. readFile(file);
D. readUrl(url);
 
Answer: d
Explanation: readUrl() opens an input connection to the given string url, read all its bytes and convert them to a string using the specified character coding or default character coding if an explicit coding argument is not given.
 

Tìm kiếm

Back
Top