
Java Foundation 6
Authored by Rukumani CT_PG
Computers
Professional Development
Used 10+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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.
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
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
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
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
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.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?