Java Gate MCQs

Java Gate MCQs

12th Grade

10 Qs

quiz-placeholder

Similar activities

GK-GENERAL KNOWLEDGE

GK-GENERAL KNOWLEDGE

KG - Professional Development

10 Qs

Java

Java

1st - 12th Grade

8 Qs

Indonesian Culture

Indonesian Culture

1st - 12th Grade

15 Qs

Quiz de Programação e Sustentabilidade

Quiz de Programação e Sustentabilidade

10th Grade - University

15 Qs

DECA Sample Exam Questions

DECA Sample Exam Questions

9th - 12th Grade

10 Qs

ISEED Mencari Bakat 3

ISEED Mencari Bakat 3

1st - 12th Grade

15 Qs

Old Tech VS New Tech

Old Tech VS New Tech

9th - 12th Grade

10 Qs

Генерация документации на языке Java

Генерация документации на языке Java

12th Grade

10 Qs

Java Gate MCQs

Java Gate MCQs

Assessment

Quiz

Other

12th Grade

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?