EXAM TOPICS- JAVA
EXAM TOPICS- JAVA
DOUBT
ANS: 1-5
ANS: 543214321321211
ANS: public List<Integer> foo(Set<Charsequence>m) {..}
Public List<Integer>foo(TreeSet<String>m){…}
ANS: 4
ANS: 08
[A, B, C]
[A, B, C]
ANS: module PrintServiceProvider {
requires PrintServiceAPI;
provides org.printservice.spi.Print with
com.provider.PrintService;
}
ANS: abcd
ANS: Double d = list.get(0);
ANS: @Meal(mainCourse=”pizza”)
@Meal(mainCourse=”salad”)
public class Main {
} Most Voted
@Meal(mainCourse=”pizza”, starter=”snack”,
dessert=”pudding”) public class Main {
}
ANS: System.out.println(Season.SPRING);
System.out.println(Season.valueOf(“SPRING”));
System.out.println(sA[1]);
ANS: setGCount(g);
aCount=a;
ANS: Locale.setDefault(Locale.JAPAN);
ResourceBundle messages =
ResourceBundle.getBundle(“messages”);
String message =
MessageFormat.format(msg.getString(“message”),“Joe”,“Jane”)
;
ANS: Green
ANS: e
F
J
B
ANS: new Comparator<String>() {
public int compare(String str1, String str2) {
return str1.compareTo(str2);
}
};
ANS: .map(testName::compareToIgnoreCase)
.peek(Member::print)
ANS: System.out.print(p2.relativize(p3));
System.out.print(p1.relativize(p3));
ANS:
Hello world!
Bonjour le monde!
ANS: This may not print the same result each time the program
runs
ANS: MyInterface1
ANS: Good Night, Potter
ANS: 357
ANS: line n4
ANS: @FunctionalInterface
interface InterfaceD {
int breed(int x);
}
@FunctionalInterface
interface InterfaceD {
int breed(int x);
}