OOPJ- Data Types-Java

OOPJ- Data Types-Java

University

10 Qs

quiz-placeholder

Similar activities

JSP

JSP

University

10 Qs

11-27 Data Types in Java

11-27 Data Types in Java

8th Grade - University

8 Qs

Java Displaying Data & Data Types

Java Displaying Data & Data Types

University - Professional Development

12 Qs

Topic 4-2: Multiple if-else and switch-case

Topic 4-2: Multiple if-else and switch-case

University

10 Qs

Java Programming

Java Programming

University

15 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

Basic java

Basic java

University

10 Qs

CIS18A Quiz 1 Review Game

CIS18A Quiz 1 Review Game

University

15 Qs

OOPJ- Data Types-Java

OOPJ- Data Types-Java

Assessment

Quiz

Computers

University

Medium

Created by

Sarju S

Used 14+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the size of a double data type in Java?

8 bytes
4 bytes
2 bytes
1 byte

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following can be a valid value for a char data type in Java?

"A"

'A'

65

'A' and 65

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the smallest primitive data type in Java?

int
float
byte
double

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a valid identifier in Java?

myVariable
var_1
3rdVariable
_tempVar

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Java, which datatype is used to store True/False values?

int
char
boolean
float

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct way to declare an hexa decimal value in Java?

int num = 0x1a;
int num = 1a;
int num = #1a;
int num = &1a;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to declare a boolean variable named isJavaFun and initialize it to true in Java?

boolean isJavaFun = true;
boolean isJavaFun == true;
isJavaFun = boolean.true;
boolean isJavaFun = 'true';

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?