Java Data Types and Type Casting

Java Data Types and Type Casting

40 Qs

quiz-placeholder

Similar activities

ICT

ICT

10th Grade

42 Qs

Data types and operators

Data types and operators

10th - 11th Grade

40 Qs

6th Grade Computer Science ~ Final Exam

6th Grade Computer Science ~ Final Exam

6th Grade

39 Qs

Python

Python

12th Grade

35 Qs

GCSE Computer Science - 2.1-2.2

GCSE Computer Science - 2.1-2.2

University

43 Qs

Final Coverage_Quiz 1

Final Coverage_Quiz 1

University

42 Qs

IH Code-A-Thon Gr-8

IH Code-A-Thon Gr-8

8th Grade

40 Qs

C++ Quiz

C++ Quiz

University

41 Qs

Java Data Types and Type Casting

Java Data Types and Type Casting

Assessment

Quiz

Computers

Medium

Created by

Al Patrick Seneres

Used 27+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used to store a single character in Java?

byte

char

int

boolean

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

true

false

0

1

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used to store decimal values in Java?

float

boolean

int

long

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the range of values for the byte data type in Java?

-128 to 127

-32,768 to 32,767

-2^31 to 2^31-1

-2^63 to 2^63-1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which type of conversion involves loss of information?

Widening conversion

Narrowing conversion

Implicit casting

Explicit casting

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default data type for integral values in Java?

byte

short

int

long

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used to specify a true or false value in Java?

byte

char

boolean

double

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?