Search Header Logo

Data types and type conversions

Authored by RAVINDRA INDURTHI

Computers

9th Grade

Used 2+ times

Data types and type conversions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is not a primitive data type?

Boolean

Character

Arrays

Integer

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of boolean?

true

false

'1'

'0'

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this program?

public class TestMain {

public static void main(String[] args) {

int abc;

System.out.println(abc+" default value");

}

}

0 default value

Compile time error - Local variable may not have been initialized

Run time error - Local variable may not have been initialized

None of Above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this program?

public class TestMain {

          static int abc;

          public static void main(String[] args) {

                   System.out.println(abc+" default value");

          }}

0 default value

Compile time error - Class variable may not have been initialized

Run time error - Class variable may not have been initialized

None of Above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

"A"

'A'

65

Both b and c

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a primitive data type in Java?

float

void

char

short

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type would be most suitable for storing the price of an item in a store?

int

double

boolean

char

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?