wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Unit 24 - Java Basics

Total questions: 10

Worksheet time: 10mins

Name
Class
Date
1.

When programming, you have to use Data Types. Which of the following refers to interfaces, classes, and arrays?

a)

Primitive

b)

Non-Primitive

c)

Arrays

d)

Boolean

2.

Classes and interfaces use a certain type of data type. Which one is it?

a)

Primitive

b)

Non-primitive

c)

Floating Point

d)

None of the answers

3.

What is the main difference between float and double data types?

a)

4.1 is an example of float.

b)

4.11 is an example of double.

c)

Float consists of 8 bytes, and double consists of 4 bytes.

d)

Float consists of 4 bytes, and double consists of 8 bytes.

4.

What kind of data type is used for numbers?

a)

Integer

b)

String

c)

Boolean

d)

Floating Point

5.

Java Tokens help the compiler. Which of the following is a type of Java Token?

a)

Identifiers

b)

Keywords

c)

Operators

d)

All of the answers.

6.

What is a blueprint and determines how an object will behave?

a)

Object

b)

Method

c)

Attribute

d)

Class

7.

In a typical Java program, which of the following are crucial?

a)

Methods, Attributes, Classes

b)

Classes, Methods, Data Types

c)

Classes, Methods, Objects

d)

None of the answers

8.

To make a particular type of data useful, you need to have properties and methods included in a self-contained component. This component also has a memory location allocated. What is it?

a)

Class

b)

Method

c)

Value

d)

Object

9.

Classes usually define operations that can be used by objects. What are these operations referred to as?

a)

Objects

b)

Classes

c)

Methods

d)

Actions

10.

What is displayed in the picture?

a)

A class called Employee.

b)

An employee object.

c)

A method for new employee.

d)

An employee.