Tag: programming languages

Questions Related to programming languages

10.Compilation of mxml file gives

  1. mxml file

  2. swf file

  3. as file

  4. Don't know


Correct Option: B

What is the output for the below code ? import java.util.NavigableMap; import java.util.concurrent.ConcurrentSkipListMap; public class Test { public static void main(String... args) { NavigableMapnavMap = new ConcurrentSkipListMap(); navMap.put(4, "April"); navMap.put(5, "May"); navMap.put(6, "June"); navMap.put(1, "January"); navMap.put(2, "February"); System.out.print(navMap.floorKey(3)); } }

  1. Compile error : No method name like floorKey()

  2. null

  3. NullPointerException

  4. 2


Correct Option: D

What is the output for the below code ? import java.util.NavigableMap; import java.util.concurrent.ConcurrentSkipListMap; public class Test { public static void main(String... args) { NavigableMapnavMap = new ConcurrentSkipListMap(); navMap.put(4, "April"); navMap.put(5, "May"); navMap.put(6, "June"); navMap.put(1, "January"); navMap.put(2, "February"); System.out.print(navMap.floorKey(3)); } }

  1. Compile error : No method name like floorKey()

  2. null

  3. NullPointerException

  4. 2


Correct Option: D
  1. compile time error at line 1

  2. compile time error at line 2

  3. compile time error at line 3

  4. prints 9

  5. Runtime exception


Correct Option: D

class H { public static void main (String[] args) { String s1 = "HHH"; StringBuffer sb2 = new StringBuffer(s1); System.out.print(sb2.equals(s1) + "," + s1.equals(sb2)); }}

  1. Prints: false,false

  2. Prints: true,false

  3. Prints: false,true

  4. Prints: true,true

  5. None of the above


Correct Option: A
  1. Dennis Ritchie

  2. Edsger Dijkstra

  3. James Gosling

  4. Louis Pasteur


Correct Option: C
  1. Hello and world

  2. Foo and Bar

  3. i and j

  4. int and float


Correct Option: B

Amoeba operating system was developed by

  1. Linus Torvalds

  2. Dennis Ritchie

  3. Sun Microsystems

  4. Andrew S. Tanenbaum


Correct Option: D