

MCQOPTIONS
Saved Bookmarks
This section includes 13 Mcqs, each offering curated multiple-choice questions to sharpen your Java Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
What is the output of this program?
|
A. | Program prints all the possible constructors of class Class |
B. | Program prints all the constructors of java.awt.Dimension package |
C. | Runtime Error |
D. | Program prints Exception |
E. | None of these |
Answer» C. Runtime Error | |
2. |
What is the output of this program?
|
A. | Program prints all the methods of java.awt.Dimension package |
B. | Program prints all the data members of java.awt.Dimension package |
C. | program prints all the methods and data member of java.awt.Dimension package |
D. | Program prints all the constructors of java.awt.Dimension package |
E. | None of these |
Answer» C. program prints all the methods and data member of java.awt.Dimension package | |
3. |
What is the output of this program?
|
A. | www.interviewmania.com/programming |
B. | www.interviewmania.com |
C. | https://www.interviewmania.com/programming |
D. | https://www.interviewmania. |
E. | None of these |
Answer» D. https://www.interviewmania. | |
4. |
What is the output of this program?
|
A. | www.interviewmania.com |
B. | https://www.interviewmania.com/programming |
C. | interviewmania.com/programming |
D. | https://www.interviewmania |
E. | None of these |
Answer» B. https://www.interviewmania.com/programming | |
5. |
What is the output of this program?
|
A. | garbage value |
B. | 1 |
C. | -1 |
D. | 0 |
E. | None of these |
Answer» D. 0 | |
6. |
What is the output of this program?
|
A. | com |
B. | www |
C. | http |
D. | https |
E. | None of these |
Answer» E. None of these | |
7. |
What is the output of this program?
|
A. | 260 |
B. | 256 |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» C. Compilation Error | |
8. |
What is the output of this program?
|
A. | https://www.interviewmania.com/java/programming |
B. | www.interviewmania.com |
C. | interviewmania.com/java/programming |
D. | https://www.interviewmania.com |
E. | None of these |
Answer» B. www.interviewmania.com | |
9. |
What is the output of this program?
|
A. | Compile time error |
B. | Runtime error |
C. | Interviewmania |
D. | interviewmania.com |
E. | None of these |
Answer» E. None of these | |
10. |
What is the output of this program?
|
A. | 1 |
B. | 0 |
C. | true |
D. | false |
E. | None of these |
Answer» E. None of these | |
11. |
What is the output of this program?
|
A. | Protocol: https |
B. | Host Name: www.interviewmania.com |
C. | Port Number: -1 |
D. | All of above |
E. | None of these |
Answer» E. None of these | |
12. |
What is the output of this program?
|
A. | false |
B. | true |
C. | Interviewmania |
D. | Interviewmania.com |
E. | None of these |
Answer» C. Interviewmania | |
13. |
Which of these exceptions is thrown by URL class s constructors? |
A. | URLNotFoundException |
B. | MalformedURLException |
C. | URLSourceNotFound |
D. | URLNotFound |
E. | None of these |
Answer» C. URLSourceNotFound | |