OOPJ- Data Types-Java

OOPJ- Data Types-Java

University

10 Qs

quiz-placeholder

Similar activities

002_Java Methods

002_Java Methods

12th Grade - University

15 Qs

Code-O-Fiesta Round 1

Code-O-Fiesta Round 1

University

15 Qs

Java Basic Unit 2 Review

Java Basic Unit 2 Review

University

11 Qs

JAVA operators

JAVA operators

University

10 Qs

Java Programming-1

Java Programming-1

University

10 Qs

Basics of JavaScript

Basics of JavaScript

11th Grade - Professional Development

15 Qs

Basics of JAVA

Basics of JAVA

University

11 Qs

JAVA QUIZ-1

JAVA QUIZ-1

University

10 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?