wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

QUIZ MS Core Java Quiz-4 2023

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Java does not support.

a)

Multiple Inheritance

b)

Single Inheritance

c)

Multilevel Inheritance

d)

Hierarchical Inheritance

2.

JDK in Java stands for?

a)

Java Data Kit

b)

Java Development Kit

c)

Java Development Kart

d)

None of the given

3.

Scanner class in Java belongs to which package?

a)

io

b)

util

c)

lang

d)

net

4.

Which of the following is correct way of writing class name in Java?

a)

MyClass

b)

myclass

c)

MYclass

d)

MYCLASS

5.

Which of the following is correct way of writing function name in Java?

a)

myfunction( )

b)

myFunction( )

c)

MYFUNCTION( )

d)

MyFunction( )

6.

Package name in Java should be written in?

a)

Small letter

b)

Capital letters

7.

What is the correct way of creating object in Java?

a)

ClassName object_name;

b)

ClassName object_name = new ConstructorName( );

c)

ClassName new = object_name ConstructorName( );

d)

ClassName object_name = ConstructorName( );

8.

Java was initially known as?

a)

Oak

b)

www

c)

Python

d)

Extended C++

9.

Which of the following is NOT used while writing main() function in Java?

a)

public

b)

static

c)

void

d)

private

10.

1. main() function is compulsory in Java.

2. Every program in Java should have at-least one class.

a)

Only 1 is true

b)

Only 2 is true

c)

Both are true

d)

Both are false