
Java MCQ-1

Quiz
•
Computers
•
University
•
Hard
Amit Mandal
Used 2+ times
FREE Resource
29 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is not the use of “this” keyword in Java?
Referring to the instance variable when a local variable has the same name
Passing itself to the method of the same class
Passing itself to another method
Calling another constructor in constructor chaining
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following Java program?
Compilation error
Runtime error
5 6 5 6
5 6 5
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the error in the following Java code?
b cannot contain value 50
b cannot contain value 100, limited by its range
No error in this code
* operator has converted b 50 into int, which can not be converted to byte without casting
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following Java program?
1
2
6
7
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following Java program?
5
6
14
compilation error
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following Java program?
1
2
Runtime Error
Compilation Error
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following Java code?
int float method
float int method
compile time error
run time error
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
Java Programming

Quiz
•
University
25 questions
Quiz 2

Quiz
•
University
30 questions
Quiz on C

Quiz
•
University
25 questions
C PROGRAMMING

Quiz
•
University
30 questions
Coding Club_SNSCE Quiz (28-04-2023)

Quiz
•
University
25 questions
GNIDOC ROUND 1

Quiz
•
University
30 questions
PYTHON

Quiz
•
University
25 questions
Web Mania - (Round 1)

Quiz
•
University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade