Java Foundation 6

Java Foundation 6

Professional Development

20 Qs

quiz-placeholder

Similar activities

Pre-Assessment: Java Basics

Pre-Assessment: Java Basics

Professional Development

20 Qs

Ultrasonic

Ultrasonic

Professional Development

15 Qs

PSC Quiz1

PSC Quiz1

University - Professional Development

20 Qs

Java Fundamentals

Java Fundamentals

Professional Development

20 Qs

WCF Training Test II

WCF Training Test II

Professional Development

25 Qs

Quiz 3

Quiz 3

Professional Development

19 Qs

Basics of Java

Basics of Java

University - Professional Development

20 Qs

Python_2R

Python_2R

KG - Professional Development

20 Qs

Java Foundation 6

Java Foundation 6

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Rukumani CT_PG

Used 10+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement about access modifiers is correct?

An instance variable can be declared with the static modifier.

A local variable can be declared with the final modifier.

An abstract method can be declared with the private modifier.

An inner class cannot be declared with the public modifier.

An interface can be declared with the protected modifier.

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

java /code/a/Test.java

javac –d /code /code/a/Tes

java /code/a/Test.java /code/b/Best.java

java –cp /code a.Test

javac –d /code /code/a/Test.java /code/b/Best.java

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which interface in the java.util.function package can return a primitive type?

ToDoubleFunction

Supplier

BiFunction

LongConsumer

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

I am an object array

The compilation fails due to an error in line 1.

I am an array

I am an object

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

42

17

The compilation fails due to an error in line 4.

The compilation fails due to an error in line 3.

The compilation fails due to an error in line 2.

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

float z = (float)(Math.round((float)x/y*100)/100)

float z = Math.round((int)(x/y),2);

float z = Math.round((float)x/y,2);

float z = Math.round((float)x/y*100)/(float)100;

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

0). one

It creates an infinite loop printing:0). one1). two1). two...

0). one1). two2). three

The compilation fails.

A java.lang.NullPointerException is thrown.

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?