
Java Gate MCQs

Quiz
•
Other
•
12th Grade
•
Hard
Niyati Pandit
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 mins • 10 pts
What is the size of the 'int' data type in Java?
6 bytes
8 bytes
2 bytes
4 bytes
2.
MULTIPLE CHOICE QUESTION
10 mins • 10 pts
What is the purpose of 'System.out.println()' in Java?
To read input from a file
To calculate mathematical expressions
To create a new object instance
To print output to the console
3.
MULTIPLE CHOICE QUESTION
10 mins • 10 pts
How do you read input from the user in Java?
Use the BufferedReader class from java.io package
Use the Scanner class from java.util package
Create a custom input reader class
Directly access System.in stream
4.
MULTIPLE CHOICE QUESTION
10 mins • 10 pts
What is the default value of an 'int' variable in Java?
null
1
-1
0
5.
MULTIPLE CHOICE QUESTION
10 mins • 10 pts
What is the difference between '==' and '.equals()' in Java?
'==' compares values, '.equals()' compares types
'==' is used for strings, '.equals()' is used for integers
'==' is a method, '.equals()' is an operator
'==' compares reference, '.equals()' compares content
6.
MULTIPLE CHOICE QUESTION
10 mins • 10 pts
What is the output of '5 + 3 * 2' in Java?
10
15
7
11
7.
MULTIPLE CHOICE QUESTION
10 mins • 10 pts
What is the 'Scanner' class used for in Java?
The 'Scanner' class in Java is used for taking user input from the console.
The 'Scanner' class in Java is used for drawing graphics on the screen.
The 'Scanner' class in Java is used for connecting to databases.
The 'Scanner' class in Java is used for generating random numbers.
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
behaviourist approach to phobias

Quiz
•
11th - 12th Grade
12 questions
Minecraft

Quiz
•
KG - Professional Dev...
8 questions
Minecraft Revision - Key Information

Quiz
•
12th Grade
11 questions
Robotics I

Quiz
•
4th - 12th Grade
10 questions
JavaScript 1

Quiz
•
9th - 12th Grade
15 questions
Chromebook Basics

Quiz
•
6th Grade - University
10 questions
Asesmen Formatif Kompetensi Level Rendah

Quiz
•
10th Grade - University
10 questions
TLE quiz module 1-5

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Video Games

Quiz
•
6th - 12th Grade
28 questions
Ser vs estar

Quiz
•
9th - 12th Grade
13 questions
BizInnovator Startup - Experience and Overview

Quiz
•
9th - 12th Grade
16 questions
AP Biology: Unit 1 Review (CED)

Quiz
•
9th - 12th Grade
20 questions
Parallel lines and transversals

Quiz
•
9th - 12th Grade
9 questions
Geometry and Trigonometry Concepts

Interactive video
•
9th - 12th Grade
10 questions
Angle Relationships with Parallel Lines and a Transversal

Quiz
•
9th - 12th Grade