Tag: programming languages
Questions Related to programming languages
Synchronized resizable-array implementation of the List interface is _____________?
What is the output for the below code ? public class Test { public static void main(String argv[]){ ArrayList list = new ArrayList(); ArrayList listStr = list; ArrayList listBuf = list; listStr.add(0, "Hello"); StringBuffer buff = listBuf.get(0); System.out.println(buff.toString()); } }
What is the output for the below code ? import java.util.LinkedList; import java.util.Queue; public class Test { public static void main(String... args) { Queue q = new LinkedList(); q.add("newyork"); q.add("ca"); q.add("texas"); show(q); } public static void show(Queue q) { q.add(new Integer(11)); while (!q.isEmpty ( ) ) System.out.print(q.poll() + " "); } }
What are the new features added to Java 1.5?
Key word "transient" is used so that the state of the object is not saved... (T/F)
Can you call one constructor from another if a class has multiple constructors
What methods java providing for Thread communications