Which statement is true about java.time.Duration?
Which action can be used to load a database driver by using JDBC3.0?
Given the code fragment:
List
List
//line n1
Which code fragment, when inserted at line n1, prints 10 20 15 30?
Given:
and the code fragment:
What is the result?
Given:
class CheckClass {
public static int checkValue (String s1, String s2) {
return s1 length() – s2.length();
}
}
and the code fragment:
String[] strArray = new String [] {“Tiger”, “Rat”, “Cat”, “Lion”}
//line n1
for (String s : strArray) {
System.out.print (s + “ “);
}
Which code fragment should be inserted at line n1 to enable the code to print Rat Cat Lion Tiger?
Given the code fragment:
Which should be inserted into line n1 to print Average = 2.5?
Given:
interface Rideable {Car getCar (String name); }
class Car {
private String name;
public Car (String name) {
this.name = name;
}
}
Which code fragment creates an instance of Car?
Given:
and the code fragment:
The threads t1 and t2 execute asynchronously and possibly prints ABCA or AACB.
You have been asked to modify the code to make the threads execute synchronously and prints ABC.
Which modification meets the requirement?
Given the content:
and given the code fragment:
Which two code fragments, when inserted at line 1 independently, enable the code to print “Wie geht’s?”
Given the code fragment:
Path path1 = Paths.get(“/app/./sys/”);
Path res1 = path1.resolve(“log”);
Path path2 = Paths.get(“/server/exe/”);
Path res1 = path1.resolve(“/readme/”);
System.out.println(res1);
System.out.println(res2);
What is the result?