Search Header Logo

Java Programming Quiz

Authored by Gouthami Reddy

Engineering

University

Used 1+ times

Java Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Who developed Java and when?

James Gosling, 1991

Bjarne Stroustrup, 1985

Guido van Rossum, 1995

Dennis Ritchie, 1972

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is not a Java buzzword?

Robust

Secure

Platform Dependent

Object-Oriented

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the size of an int in Java?

2 bytes

4 bytes

8 bytes

Depends on OS

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output of the code below? int a = 5, b = 2; System.out.println(a / b);

2.5

2

3

Compilation Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Correct way to declare an array in Java?

int arr[] = new int[5];

int arr = int[5];

arr[] = new int[5];

array int arr[5];

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does this print? int[] nums = {1, 2, 3}; System.out.println(nums[1]);

1

2

3

Compilation Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output of this code? int x = 10; x += 5 * 2; System.out.println(x);

20

30

25

15

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?