java.rmi package is used for invoking a method remotely
Which value is typically returned under normal termination of a program?
Which method is used to verify the actual and expected results in JUnit?
Which of the following lines give an error?
Which method returns the remainder of dividend/divisor?
Which of the following methods is used to copy data from one array to another?
Which Java collection class allows you to associate its elements with key values, and retrieve objects in FIFO (first-in, first-out) order?
What is the purpose of using wildcards in programming?
What is the output of the following Java code?
import java.util.*;
import java.util.function.Predicate;
class Abekus {
public static void main(String args[]) {
List<String> L =
Arrays.asList("Amrit","Gautam","Abinash","Kajal","Anand");
Predicate<String> S = (s)->s.startsWith("A");
for (String i:L) {
if (S.test(i))
System.out.print(i + " ");
}
}
}
import java.util.*;
public class outputs
{
public static void main(String args[])
{
LinkedList list = new LinkedList();
list.add(new Integer(3));
list.add(new Integer(9));
list.add(new Integer(5));
list.add(new Integer(1));
list.addFirst(new Integer(6));
list.addLast(new Integer(9));
Iterator i = list.iterator();
Collections.sort(list);
System.out.print(list.getLast() + " " +list.peekFirst() + " "+ list.peekLast());
}
}