Java set 1

Java set 1

University

10 Qs

quiz-placeholder

Similar activities

java questions

java questions

University

10 Qs

JSP

JSP

University

10 Qs

JAVA FUNDAMENTALS

JAVA FUNDAMENTALS

University

12 Qs

Java Arrays

Java Arrays

5th Grade - University

10 Qs

Java Lesson 11

Java Lesson 11

5th Grade - University

10 Qs

Java Programming Quiz

Java Programming Quiz

University

13 Qs

QUIZ KELAS JAVA

QUIZ KELAS JAVA

University

10 Qs

TPC-CONTROL 01

TPC-CONTROL 01

University

10 Qs

Java set 1

Java set 1

Assessment

Quiz

Other

University

Hard

Created by

ESPARK 2023

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the output of the following program.

short x = 10;

x = x * 5;

System.out.print(x);

50

10

compile error

exception

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Identify what can directly access and change the value of the variable res. package com.mypackage;

public class Solution{

private int res = 100;

}

Any class

only Solution class

any class that extends solution

none

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To which of the following does the class string belong to.

java.lang

java.applet

java.awt

java.string

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output of Math.floor(5.9)?

5

6

5.0

5.5

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the variables declared in a class for the use of all methods of the class called?

Object

Instance variables

Reference variables

None

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When is the finalize() method called?

Before Garbage Collection

Before an Object goes out of Scope

None

Before a variable goes out of Scope

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Identify the infinite loop

for(;;)

for(int i=0;i<1;i++)

for(int i=0;;i++)

All of the Above

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?