Friday, 7 September 2012

What will happen when you attempt to compile and run the following code snippet? Hashtable table = new Hashtable (); Table.put ( "Java", "Platform Independence"); Table.put ( "Java", "Great Language!"); System.out.println ( "Java:" + table.get ( "Java")); | JAVA JSP

  A. The code will not compile
  B. It will print-Java: Platform Independence
  C. Java-It will print: Great Language!
  D. It will print-Java: Platform IndependenceGreat Language!
  E. Runtime Exception

  Ans: C


No comments: