Java Fundamentals MCQs

Java Fundamentals MCQs

Professional Development

25 Qs

quiz-placeholder

Similar activities

Java Quiz on Module 1 & 2

Java Quiz on Module 1 & 2

Professional Development

21 Qs

QUIZ-5 static, String and StringBuffer

QUIZ-5 static, String and StringBuffer

Professional Development

20 Qs

Code.org CSA Unit 2

Code.org CSA Unit 2

Professional Development

20 Qs

AP CSA Unit 1&2 Test

AP CSA Unit 1&2 Test

8th Grade - Professional Development

25 Qs

Java

Java

Professional Development

25 Qs

Java Operator-1 - By Krishan Kumar Sharma

Java Operator-1 - By Krishan Kumar Sharma

Professional Development

20 Qs

C

C

Professional Development

20 Qs

UG Code Breaker Challenge Round-1

UG Code Breaker Challenge Round-1

Professional Development

30 Qs

Java Fundamentals MCQs

Java Fundamentals MCQs

Assessment

Quiz

Computers

Professional Development

Hard

Created by

Ms STAFF

Used 1+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of a local variable in Java?

0

null

Depends on data type

Compilation error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is a valid identifier in Java?

2value

_value

@value

value#

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? int x = 5; int y = 10; System.out.println(x + y + "Hello");

15Hello

Hello15

5Hello10

Compilation error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a constant in Java?

static

final

const

constant

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is not a primitive data type in Java?

int

boolean

String

double

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following code? int x = 10; System.out.println(x > 10 ? "Greater" : "Not Greater");

Greater

Not Greater

true

false

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code? char c = 65; System.out.println(c);

A

65

Error

a

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?