wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Java Basic - Core

Total questions: 20

Worksheet time: 9mins

Name
Class
Date
1.

A ___________ file is created after successful compilation of a Java program.

a)

Object file

b)

Array file

c)

Class file

d)

String file

2.

Command to compile Java program

a)

javax

b)

javay

c)

javac

d)

Java

3.

Command to run a Java program

a)

javac

b)

java

c)

javadoc

d)

java

4.

Java was originally named:

a)

Coffee

b)

Oak

c)

C#

d)

Duke

5.

Java programs ________________

a)

are only compiled

b)

are only compiled not interpreted

c)

are only interpreted

d)

are both compiled and interpreted

6.

Main() method is not mandatory for a Java program

a)

True

b)

False

7.

Which of the following personality is called as father of Java Programming language –

a)

Bill Gates

b)

Larry Page

c)

Brendan Greene

d)

James Gosling

8.

Java was developed in which year

a)

1992

b)

1993

c)

1994

d)

1995

9.

Java does not support.

a)

Multiple Inheritance

b)

Single Inheritance

c)

Multilevel Inheritance

d)

Hierarchical Inheritance

10.

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( );

11.

An expression involving byte, int, and literal numbers is promoted to which of these?

a)

Int

b)

Long

c)

Byte

d)

Float

12.

Which of these operators is used to allocate memory to array variable in Java?

a)

malloc

b)

alloc

c)

new

d)

new malloc

13.

What should be expression1 evaluate to in using ternary operator as in this line?

expression1 ? expression2 : expression3

a)

Floating point number

b)

Integer

c)

Boolean

d)

None of the mentioned

14.

What does super keyword points to?

a)

Super Class

b)

Immediate parent class

c)

none

d)

Child class

15.

What is the latest version of Java SE?

a)

16

b)

1.6

c)

18

d)

1.8

16.

Wrapper class data type have bigger memory allocation then their respective primitive data type counter parts.

a)

True

b)

False

17.

Column size of a 2D array can be allocated separately!

a)

True

b)

False

18.

Their is no super class of a class if it does not extends one.

a)

True

b)

False

19.

Where was the name 'Java' taken from?

a)

An Island name in Indonesia

b)

A Coffee Species

c)

A Country Name

d)

Developers' Pets' name

20.

Char data type is which type of data type?*

a)

Numeric

b)

Character type

c)

Non-numeric

d)

None of the above