

MCQOPTIONS
Saved Bookmarks
1. |
What is the output of this program? Note: Host URL is having length of content 127. import java.net.*; class networking { public static void main(String[] args) throws Exception { URL obj = new URL("https://www.mcqsmentor.com/"); URLConnection obj1 = obj.openConnection(); int len = obj1.getContentLength(); System.out.print(len); } } |
A. | 126 |
B. | 127 |
C. | Compilation Error |
D. | Runtime Error |
Answer» C. Compilation Error | |