OOPJ- Data Types-Java

OOPJ- Data Types-Java

University

10 Qs

quiz-placeholder

Similar activities

Java

Java

University

15 Qs

Java GUI

Java GUI

University

15 Qs

Introdução a Programação

Introdução a Programação

University

12 Qs

Java quiz

Java quiz

University

8 Qs

Intro to Java 1

Intro to Java 1

University

15 Qs

Unit2 Java Viable

Unit2 Java Viable

University

9 Qs

Basic Java Quiz

Basic Java Quiz

University

15 Qs

Java Basics

Java Basics

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?