JAVA Question
JAVA Question
JAVA Question
Given:
A. A
2-4
B. B
0-6
1-5
2-4
C. C
1-5
Most Voted
D. D
1-5
2-4
E. E
F. F
0-6
G. G
0-6
2-4
Correct Answer:
C
Hide Answer
Share
Question #2
Given:
A. A
54321
B. B
C. C
nothing
D. D
543214321321211
Most Voted
Correct Answer:
C
Hide Answer
uestion Discussion12 ChatGPT Statistics
Share
Question #3
Given:
and
Which two method definitions at line n1 in the Bar class compile? (Choose two.)
A. A
B. B
Most Voted
C. C
Most Voted
D. D
E. E
F. F
Correct Answer:
CF
Hide Answer
Share
Question #4
Given:
A. A
B. B
Most Voted
C. C
D. D
Correct Answer:
B
Hide Answer
uestion Discussion8 ChatGPT Statistics
Share
Question #5
A. A
0 8 10
B. B
C. C
D. D
049
E. E
08
Most Voted
Correct Answer:
E
Question #6
A. A
B. B
C. C
D. D
Most Voted
Correct Answer:
A
Hide Answer
Share
Question #7
A. A
int[][][] e = {{1,1,1},{2,2,2}};
B. B
short sh = (short)’A’;
Most Voted
C. C
float x = 1f;
Most Voted
D. D
byte b = 10;
char c = b;
E. E
F. F
int x = 12_34;
Most Voted
G. G
Correct Answer:
CBF
Hide Answer
Share
Question #8
Your organization makes mlib.jar available to your cloud customers. While working on a new feature for
mlib.jar, you see that the customer visible method public void enableService(String hostName, String
portNumber) executes this code fragment
and you see this grant is in the security policy file:
What security vulnerability does this expose to your cloud customer's code?
A. A
Most Voted
B. B
C. C
D. D
none because the customer code base must also be granted SocketPermission
E. E
Correct Answer:
B
Hide Answer
Share
Question #9
Given:
and
A. A
Joe -
null
Most Voted
B. B
null
Mary
C. C
Joe -
Marry
D. D
null
null
Correct Answer:
A
Hide Answer
Share
Question #10
Given:
A. A
[A, B, C]
followed by an exception thrown on line 11.
B. B
[A, B, C]
[A, B]
C. C
[A, B, C]
[A, B, C]
Most Voted
D. D
Question #11
Which module-info.java is correct for a service provider for a print service defined in the PrintServiceAPI
module?
A. A
module PrintServiceProvider {
requires PrintServiceAPI;
exports org.printservice.spi;
}
B. B
module PrintServiceProvider {
requires PrintServiceAPI;
provides org.printservice.spi.Print with
com.provider.PrintService;
}
Most Voted
C. C
module PrintServiceProvider {
requires PrintServiceAPI;
uses com.provider.PrintService;
}
D. D
module PrintServiceProvider {
requires PrintServiceAPI;
exports org.printservice.spi.Print with
com.provider.PrintService;
}
Correct Answer:
A
Hide Answer
Share
Question #12
A. A
B. B
C. C
D. D
Correct Answer:
B
Hide Answer
Share
Question #13
Why would you choose to use a peek operation instead of a forEach operation on a Stream?
A. A
B. B
C. C
Most Voted
D. D
Correct Answer:
C
Hide Answer
Share
Question #14
Given:
A. A
abcd
Most Voted
B. B
adf
D. D
abd
E. E
abdf
Correct Answer:
A
Hide Answer
Share
Question #15
A. A
Double d = list.get(0);
Most Voted
B. B
double f = list.get(0);
C. C
Integer a = Integer.valueOf(list.get(0));
D. D
Integer b = list.get(0);
E. E
int c = list.get(0);
F. F
Double e = Double.valueOf(list.get(0));
Correct Answer:
C
Question #16
Given:
and
A. A
@Meal(mainCourse=”pizza”)
@Meal(dessert=”pudding”)
public class Main {
}
B. B
@Meal(mainCourse=null)
public class Main {
}
C. C
D. D
@Meal(mainCourse=”pizza”)
@Meal(mainCourse=”salad”)
public class Main {
}
Most Voted
E. E
Most Voted
Correct Answer:
BE
Hide Answer
Share
Question #17
Given:
Which three code fragments, at line n1, prints SPRING? (Choose three.)
A. A
System.out.println(Season.valueOf(“SPRING”).ordinal());
B. B
System.out.println(Season.values(1));
C. C
System.out.println(Season.SPRING);
Most Voted
D. D
System.out.println(Season.valueOf(“SPRING”));
Most Voted
E. E
System.out.println(Season.valueOf(‘s’));
F. F
System.out.println(sA[0]);
G. G
System.out.println(sA[1]);
Most Voted
Correct Answer:
BCE
Hide Answer
Share
Question #18
Given:
Which two lines of code when inserted in line 1 correctly modifies instance variables? (Choose two.)
A. A
cCount = setCCount(c);
B. B
setCCount(c) = cCount;
C. C
setGCount(g);
Most Voted
D. D
tCount = tCount;
E. E
aCount = a;
Most Voted
Correct Answer:
BD
Hide Answer
uestion Discussion5 ChatGPT Statistics
Share
Question #19
Given:
and
and
A. A
B. B
C. C
Locale.setDefault(Locale.JAPAN);
ResourceBundle messages = ResourceBundle.getBundle(“messages”);
String message = MessageFormat.format(msg.getString(“message”),“Joe”,“Jane”);
D. D
ResourceBundle msg = ResourceBundle.getBundle(“messages”, Locale.JAPAN);
String[] names = “Joe”, “Jane”);
String message = MessageFormat.format(msg.getString(“message”),names);
Most Voted
Correct Answer:
D
Hide Answer
Share
Question #20
Given:
A. A
B. B
C. C
D. D
Most Voted
Correct Answer:
C
Question #21
A company has an existing Java 8 jar file, sales-app-1.1.1.jar, that uses several Apache open source jar
files that have not been modularized.
A. A
module com.company.sales_app {
requires commons.beanutils;
requires org.apache.commons.collections4;
requires org.apache.commons.lang3;
requires org.apache.commons.text;
}
Most Voted
B. B
module com.company.sales_app {
requires org.apache.commons.beanutils;
requires org.apache.commons.collections4;
requires org.apache.commons.lang3;
requires org.apache.commons.text;
}
C. C
module com.company.sales_app {
requires commons.beanutils;
requires commons.collections4;
requires commons.lang3;
requires commons.text;
}
D. D
module com.company.sales_app {
requires commons.beanutils-1.9.3;
requires commons.collections4-4.2;
requires commons.lang3-3.8.1;
requires commons.text-1.3;
}
Correct Answer:
A
Hide Answer
Share
Question #22
A. A
B. B
Most Voted
C. C
D. D
E. E
Most Voted
Correct Answer:
CE
Hide Answer
Share
Question #23
Given:
and
A. A
Mr. Green
B. B
Green
Most Voted
C. C
Mr. Blue
Correct Answer:
C
Hide Answer
Share
Question #24
Given:
B. B
C. C
Most Voted
D. D
Correct Answer:
D
Question #25
A. A
characters = reader.read();
B. B
reader.readLine();
C. C
characters.read();
D. D
reader.read(characters);
Most Voted
Correct Answer:
B
Question #26
Given:
and
Which four identifiers from the Foo and Bar classes are visible at line 1? (Choose four.)
A. A
Most Voted
B. B
Most Voted
C. C
D. D
j
Most Voted
E. E
F. F
G. G
H. H
Most Voted
I. I
J. J
Correct Answer:
CFHJ
Hide Answer
Share
Question #27
A. A
B. B
C. C
Most Voted
D. D
Correct Answer:
A
Hide Answer
Share
Question #28
Given the code fragment:
A. A
It never finishes.
Most Voted
B. B
C. C
D. D
Correct Answer:
A
Hide Answer
Share
Question #29
Given:
A. A
B. B
Cylinder is not properly calling the Rectangle and Ellipse interfaces’ calculateSurfaceArea methods.
C. C
Most Voted
D. D
The calculateSurfaceArea method within Rectangle and Ellipse requires a public access modifier.
Correct Answer:
B
Hide Answer
Share
Question #30
Given a Member class with fields for name and yearsMembership, including getters and setters and a
print method, and a list of clubMembers members:
Which two Stream methods can be changed to use method references? (Choose two.)
A. A
.filter(Integer::equals(0))
B. B
.map(testName::compareToIgnoreCase)
Most Voted
C. C
D. D
.peek(Member::print)
Most Voted
Correct Answer:
BC
Question #31
Given:
Path p1 = Paths.get(“/scratch/exam/topsecret/answers”);
Path p2 = Paths.get(“/scratch/exam/answers/temp.txt”);
Path p3 = Paths.get(“/scratch/answers/topsecret”);
Which two statements print ..\..\..\answers\topsecret? (Choose two.)
A. A
System.out.print(p3.relativize(p1));
B. B
System.out.print(p2.relativize(p3));
Most Voted
C. C
System.out.print(p1.relativize(p3));
Most Voted
D. D
System.out.print(p3.relativize(p2));
E. E
System.out.print(p1.relativize(p2));
F. F
System.out.print(p2.relativize(p1));
Correct Answer:
AC
Hide Answer
Share
Question #32
Given the code fragment:
A. A
B. B
C. C
Most Voted
D. D
Correct Answer:
A
Hide Answer
Share
Question #33
Given:
A. A
B. B
-----
banana orange apple lemon
-----
apple banana lemon orange
C. C
-----
-----
D. D
-----
-----
banana orange apple lemon apple banana lemon orange
Most Voted
E. E
Hide Answer
Share
Question #34
and
A. A
Bonjour le monde!
Bonjour le monde!
B. B
Hello world!
Hello world!
C. C
Hello world!
Bonjour le monde!
Most Voted
D. D
Bonjour le monde!
Hello world!
Correct Answer:
C
Hide Answer
Share
Question #35
Given:
What is true?
A. A
B. B
C. C
This should print the same result each time the program runs.
D. D
This may not print the same result each time the program runs.
Most Voted
Correct Answer:
D
Question #36
Given:
A. A
Most Voted
B. B
C. C
[). o, | 1). a, | 2).]
D. D
E. E
Correct Answer:
A
Hide Answer
Share
Question #37
Given:
A. A
B. B
-3
C. C
-2
D. D
Most Voted
Correct Answer:
D
Hide Answer
Share
Question #38
A. A
B. B
Most Voted
D. D
replace line 1 with private AtomicInteger count = new AtomicInteger(0); and replace line 3 with
test.count.incrementAndGet();
Most Voted
E. E
Correct Answer:
DE
Hide Answer
Share
Question #39
Given the code fragment:
A. A
B. B
C. C
D. D
Most Voted
E. E
Correct Answer:
D
Hide Answer
Share
Question #40
A. A
B. B
201
C. C
de
D. D
203
E. E
Most Voted
F. F
Correct Answer:
E
Question #41
A. A
foo( n -> Integer.toHexString(n) )
Most Voted
B. B
foo( toHexString )
C. C
foo( n -> n + 1 )
D. D
E. E
F. F
foo( Integer::toHexString )
Most Voted
G. G
foo( n::toHexString )
H. H
Correct Answer:
AC
Hide Answer
Share
Question #42
A. A
@interface Author {
String name() default “”;
String date();
}
Most Voted
B. B
C. C
@interface Author {
String name() default null;
String date();
}
D. D
@interface Author {
String name();
String date;
}
E. E
@interface Author {
String name();
String date default “”;
}
Correct Answer:
A
Hide Answer
Share
Question #43
Given:
and
and
A. A
Most Voted
B. B
A java.lang.NoSuchMethodException is thrown.
C. C
D. D
A java.lang.IllegalAccessException is thrown.
E. E
Correct Answer:
E
Hide Answer
uestion Discussion29 ChatGPT Statistics
Share
Question #44
Given:
A. A
MyInterface4
B. B
MyInterface5
C. C
MyInterface1
Most Voted
D. D
MyInterface3
Most Voted
E. E
MyInterface2
Correct Answer:
DE
Hide Answer
Share
Question #45
Given:
and
and
A. A
B. B
C. C
D. D
Correct Answer:
B
Question #46
A. A
357
Most Voted
B. B
35
C. C
235
D. D
2357
E. E
Hide Answer
Share
Question #47
Given:
A. A
line n1
B. B
line n3
C. C
line n2
D. D
line n4
Most Voted
Correct Answer:
D
Hide Answer
Share
Question #48
A. A
A java.lang.NullPointerException is thrown.
B. B
false
C. C
A java.lang.UnsupportedOperationException is thrown.
Most Voted
D. D
true
Correct Answer:
A
Hide Answer
Share
Question #49
Given:
A. A
B. B
9001: APPLICATION ERROR-9001-MyFile.txt
9001: java.io.FileNotFoundException: MyFile.txt-MyFile.txt
C. C
Most Voted
D. D
Correct Answer:
D
Hide Answer
Share
Question #50
A. A
@FunctionalInterface
interface InterfaceC {
public boolean equals(Object o);
int breed(int x);
int calculate(int x, int y);
}
B. B
@FunctionalInterface
interface InterfaceD {
int breed(int x);
}
Most Voted
C. C
@FunctionalInterface
interface InterfaceE {
public boolean equals(int i);
int breed(int x);
}
D. D
interface InterfaceA {
int GERM = 13;
public default int getGERM() { return GERM; }
}
E. E
interface InterfaceB {
int GERM = 13;
public default int getGERM() { return get(); }
private int get() { return GERM; }
public boolean equals(Object o);
int breed(int x);
}
Most Voted
Correct Answer:
AC -
Which code fragment does a service use to load the service provider with a Print interface?
A. A
Most Voted
B. B
C. C
D. D
private Print print = com.service.Provider.getInstance();
Correct Answer:
A
Hide Answer
Share
Question #52
Given:
and
A. A
null
B. B
HH
C. C
Y@<>
D. D
Most Voted
Correct Answer:
D
Hide Answer
Share
Question #53
Given:
Which is true?
A. A
B. B
It prints 666.
C. C
The code compiles and runs successfully but with a wrong answer (i.e., a bug).
D. D
Correct Answer:
A
Hide Answer
Share
Question #54
Given:
and
and
A. A
42
Most Voted
B. B
C. C
D. D
E. E
F. F
G. G
17
Correct Answer:
G
Hide Answer
Share
Question #55
Given:
A. A
Consumer function = (String f) -> (System.out.println(f);};
Most Voted
B. B
C. C
D. D
Correct Answer:
D
Question #56
Given:
A. A
Most Voted
B. B
Ans : a
C. C
D. D
Ans :
Correct Answer:
A
Hide Answer
Share
Question #57
Given:
What is the correct definition of the JsonField annotation that makes the Point class compile?
A. A
B. B
C. C
D. D
Most Voted
Correct Answer:
C
Hide Answer
Share
Question #58
Given:
What is the result?
A. A
AnotherClass#methodA()
SomeClass#methodA()
B. B
C. C
Most Voted
D. D
AnotherClass#methodA()
AnotherClass#methodA()
E. E
SomeClass#methodA()
AnotherClass#methodA()
F. F
SomeClass#methodA()
SomeClass#methodA()
Correct Answer:
B
Hide Answer
Share
Question #59
Given:
A. A
B. B
C. C
D inherits a() from B and C but the return types are incompatible.
Most Voted
D. D
Correct Answer:
C
Hide Answer
Share
Question #60
Your organization provides a cloud server to your customer to run their Java code. You are reviewing the
changes for the next release and you see this change in one of the config files:
Which is correct?
A. A
You accept the change because -noverify is necessary for your code to run with the latest version of Java.
B. B
You reject the change because -Xms8g -Xmx8g uses too much system memory.
C. C
You accept the change because -noverify is a standard option that has been supported since Java 1.0.
D. D
Most Voted
Correct Answer:
D
Given:
and
and
and
What needs to change to make these classes compile and still handle all types of Interface Worker?
A. A
B. B
C. C
D. D
Most Voted
Correct Answer:
D
Hide Answer
Share
Question #62
Given:
A. A
Short value 25
B. B
C. C
Byte value 25
D. D
Object value 25
Most Voted
Correct Answer:
B
Hide Answer
Share
Question #63
Given:
A. A
B. B
C. C
D. D
Most Voted
Correct Answer:
D
Hide Answer
Share
Question #64
Given:
A. A
B. B
nothing
Most Voted
C. C
D. D
Correct Answer:
C
Hide Answer
Share
Question #65
Given:
and
and
A. A
B. B
C. C
D. D
Most Voted
E. E
Most Voted
F. F
H. H
Most Voted
I. I
Correct Answer:
A, C, I
Question #66
A. A
10
B. B
C. C
E. E
Most Voted
Correct Answer:
E
Hide Answer
Share
Question #67
System.out.println(Alphabet.getFirstLetter());
A. A
B. B
Most Voted
C. C
Correct Answer:
D
Hide Answer
Share
Question #68
A. A
B. B
11
C. C
15
Most Voted
D. D
21
E. E
23
Correct Answer:
D
Hide Answer
Share
Question #69
@inteface Resource {
String[] value();
}
Which two annotations may be applied at Loc1 in the code fragment? (Choose two.)
A. A
@Resource({“Customer1”, “Customer2”})
Most Voted
B. B
@Resource(value={{}})
C. C
@Resource
D. D
@Resource(“Customer1”)
Most Voted
E. E
@Resource()
Correct Answer:
AD
Hide Answer
Share
Question #70
Given:
and
Assuming that this code compiles correctly, which three statements are true? (Choose three.)
A. A
A cannot be abstract.
B. B
A cannot be final.
Most Voted
C. C
B cannot be abstract.
Most Voted
D. D
B cannot be final.
E. E
B is a subtype of A.
Most Voted
F. F
A is a subtype of B.
Correct Answer:
ABD
Question #71
Given:
A. A
B. B
1 2 [1, 2, 3, 4] 3 4
C. C
1 2 [1, 2, 3, 4] 3 four
D. D
1 2 [1, 2, 3, four] 3 4
Most Voted
Correct Answer:
B
Hide Answer
Share
Question #72
A. A
B. B
Most Voted
C. C
D. D
Correct Answer:
B
Hide Answer
Share
Question #73
C-
C++
Java -
Go -
Kotlin -
and
A. A
C-
C++
Go -
Kotlin
B. B
JAVA
C. C
C-
C++
GO -
KOTLIN
D. D
C-
C++
JAVA -
GO -
KOTLIN
Most Voted
Correct Answer:
D
Hide Answer
Share
Question #74
Given:
1 2 followed by an exception
B. B
1245
C. C
Most Voted
D. D
1 2 3 followed by an exception
Correct Answer:
C
Hide Answer
Share
Question #75
Given:
A. A
Most Voted
C. C
D. D
Correct Answer:
C
Question #76
Given:
Which two statements are valid to be written in this interface? (Choose two.)
A. A
Most Voted
B. B
public int x;
C. C
D. D
E. E
Most Voted
F. F
G. G
Correct Answer:
AE
Hide Answer
Share
Question #77
Given:
A. A
hey oh hi
B. B
yo ey
C. C
D. D
oh hi hey
E. E
hey oh hi yo ey
Most Voted
F. F
hey oh hi ey
Correct Answer:
E
Hide Answer
Share
Question #78
A. A
java.base
Most Voted
B. B
java.se
C. C
java.lang
D. D
java.object
Correct Answer:
A
Hide Answer
Share
Question #79
Integer i = 11;
A. A
Double c = (Double) i;
B. B
Double b = Double.valueOf(i);
Most Voted
C. C
Double a = i;
D. D
double e = Double.parseDouble(i);
E. E
double d = i;
Most Voted
Correct Answer:
AB
Hide Answer
Share
Question #80
Given:
and
and
A. A
B. B
ab action
Most Voted
C. C
a action
E. E
Correct Answer:
E
Question #81
Given:
A. A
B. B
Most Voted
C. C
D. D
Make A synchronized.
E. E
Correct Answer:
D
Hide Answer
Share
Question #82
A company has an existing Java app that includes two Java 8 jar files, sales-8.10.jar and clients-10.2.jar.
The jar file, sales-8.10.jar, references packages in clients-10.2.jar, but clients-10.2.jar does not reference
packages in sales-8.10.jar.
Which module-info.java file would work for the new library version clients-10.3.jar?
A. A
module com.company.clients{
requires com.company.clients;
}
B. B
module com.company.clients{
uses com.company.clients;
}
C. C
module com.company.clients {
exports com.company.clients.Client;
}
D. D
module com.company.clients {
exports com.company.clients;
}
Most Voted
Correct Answer:
C
Hide Answer
Share
Question #83
Which two statements are correct about modules in Java? (Choose two.)
A. A
B. B
C. C
By default, modules can access each other as long as they run in the same folder.
D. D
Most Voted
E. E
Most Voted
Correct Answer:
AE
Hide Answer
Share
Question #84
Assuming the user credentials are correct, which expression will create a Connection?
A. A
B. B
DriverManager.getConnection("jdbc:derby:com")
Most Voted
C. C
DriverManager.getConnection("jdbc.derby.com")
D. D
DriverManager.getConnection()
E. E
DriverManager.getConnection("J_SMITH", "dt12%2f3")
Correct Answer:
A
Hide Answer
Share
Question #85
Given:
Which is true? (Choose four.)
A. A
B. B
Most Voted
C. C
D. D
E. E
Most Voted
F. F
G. G
Correct Answer:
ACEF
Question #86
Given:
Which two Map objects group all employees with a salary greater than 30 by neighborhood? (Choose
two.)
A. A
Most Voted
B. B
C. C
D. D
E. E
Correct Answer:
A
Hide Answer
Share
Question #87
Given:
A. A
abyssinian
oxicat
korat
laperm
bengal
sphynx
B. B
abyssinian
bengal
korat
laperm
oxicat
sphynx
C. C
sphynx
oxicat
laperm
korat
bengal
abyssinian
Most Voted
D. D
nothing
Correct Answer:
C
Hide Answer
Share
Question #88
Given:
A. A
1.99,2.99,0
B. B
1.99,2.99,0.0
C. C
Most Voted
D. D
1.99,2.99
Correct Answer:
B
Hide Answer
Share
Question #89
Given:
and
Which statement is true?
A. A
B. B
C. C
D. D
Most Voted
Correct Answer:
A
Hide Answer
Share
Question #90
Given:
and
A. A
B. B
The method Y.print (Object) does not call the method super.print (Object).
C. C
The method Y.print (Object...) cannot override the final method X.print (Object...).
Most Voted
E. E
The method print (Object) and the method print (Object...) are duplicates of each other.
Correct Answer:
D
Question #91
Given:
A. A
Most Voted
B. B
C. C
the loop starting line 14
D. D
Correct Answer:
A
Hide Answer
Share
Question #92
A. A
System.out.printIn(IntStream.range(0, 99).count());
B. B
System.out.printIn(IntStream.rangeClosed(1, 100).count());
Most Voted
C. C
System.out.printIn(IntStream.range(1, 100).count());
D. D
Hide Answer
Share
Question #93
Given:
A. A
385
B. B
C. C
D. D
80
Most Voted
E. E
25
Correct Answer:
A
Hide Answer
Share
Question #94
A. A
Most Voted
B. B
var _ = 100;
C. C
Most Voted
D. D
var y = null;
E. E
var a;
Correct Answer:
AC
Hide Answer
Share
Question #95
Given:
Which two changes need to be made to make this class compile? (Choose two.)
A. A
B. B
Most Voted
C. C
D. D
E. E
Change Line 1 to an abstract class:
public abstract class API {
Most Voted
Correct Answer:
BE
Question #96
Given:
and
and
A. A
Most Voted
B. B
C. C
void x() { }
public void y() { }
public void z() { }
D. D
E. E
void x() { }
public void z() { }
Correct Answer:
A
Hide Answer
Share
Question #97
Given:
A. A
Most Voted
B. B
Most Voted
C. C
D. D
E. E
Most Voted
F. F
Correct Answer:
ABE
Hide Answer
Share
Question #98
Given:
and
Which two lines can replace line 1 so that the Y class compiles? (Choose two.)
A. A
super.set(List map)
B. B
C. C
set(map.values());
Most Voted
D. D
set(map)
E. E
super.set(map.values());
Most Voted
Correct Answer:
CE
Hide Answer
Share
Question #99
A. A
B. B
C. C
D. D
Most Voted
E. E
Correct Answer:
D
Hide Answer
Share
Question #100
Given TripleThis.java:
Compiling TripleThis.java gives this compiler warning:
Which two replacements remove this compiler warning and prints 12? (Choose two.)
A. A
Most Voted
B. B
C. C
D. D
Most Voted
E. E
F. F
Correct Answer:
AD
Question #101
A. A
Add catch(M | L e)
B. B
Add catch(L e)
Most Voted
C. C
Add catch(N | L | M e)
D. D
Add catch(L | N e)
E. E
Add catch(L | M | N e)
Correct Answer:
B
Hide Answer
Share
Question #102
Which two code snippets inserted independently inside println method print Mondial:domainmodel?
(Choose two.)
A. A
Main.prefix + Main.name
B. B
prefix + getName
C. C
Main.prefix + Main.getName()
Most Voted
D. D
E. E
prefix + name
F. F
prefix + Main.name
Correct Answer:
BC
Hide Answer
Share
Question #103
A. A
[Lettuce, Kale]
B. B
A compilation error is thrown.
C. C
[Lettuce, Kale]
[Seabass, Salmon]
Most Voted
D. D
[Kale, Lettuce]
[Salmon, Seabass]
Correct Answer:
B
Hide Answer
Share
Question #104
Given:
Automobile.java -
Car.java -
What must you do so that the code prints 4?
A. A
Most Voted
B. B
C. C
D. D
Correct Answer:
A
Hide Answer
Share
Question #105
A. A
java.desktop
Most Voted
B. B
java.prefs
C. C
java.se
D. D
java.logging
E. E
java.rmi
Correct Answer:
A