Java and Flex Programming Quiz

Covers Java language concepts including interfaces, static members, and collections (NavigableMap), as well as Flex/Air development including MXML, event propagation, and RIA concepts.

13 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

1.Which tag is must for compilation of mxml file?

  1. Box
  2. Application
  3. Button
  4. Panel
Question 2 Multiple Choice (Single Answer)

2.Which two languages are used in Flex?

  1. Java & C
  2. mxml & as
  3. C & C
  4. java & javascript.
Question 3 Multiple Choice (Single Answer)

Can we create custom components ?

  1. Yes
  2. No
  3. Don't know
  4. No Idea
Question 4 Multiple Choice (Single Answer)

How to include mxml file?

  1. In Application tag
  2. In Script tag
  3. We can use either a or b
  4. None of the above
Question 5 True/False

5.Flex application implements RIA Concepts.

  1. True
  2. False
Question 6 True/False

Flex Application requires Adobe Flash Player

  1. True
  2. False
Question 7 Multiple Choice (Single Answer)

Sequence of Event Propagation

  1. bubbling-target-capturing
  2. target-bubbling-capturing
  3. capturing-target-bubbling
  4. Can't say
Question 8 Multiple Choice (Single Answer)

which tags are not mandatory for mxml file

  1. ?
  2. xml=”version”
  3. encode=”utf-8”
  4. None of the above
Question 9 Multiple Choice (Single Answer)

10.Compilation of mxml file gives

  1. mxml file
  2. swf file
  3. as file
  4. Don't know
Question 10 Multiple Choice (Single Answer)

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) { NavigableMap <Integer, String>navMap = new ConcurrentSkipListMap<Integer, String>(); System.out.print(navMap.lastEntry()); } }

  1. Compile error : No method name like lastEntry()
  2. null
  3. NullPointerException
  4. 0
Question 11 Multiple Choice (Single Answer)

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) { NavigableMap<Integer, String>navMap = new ConcurrentSkipListMap<Integer, String>(); 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
Question 12 Multiple Choice (Single Answer)

What is the output for the below code ? import java.io.Console; public class Test { public static void main(String... args) { Console con = System.console(); boolean auth = false; if (con != null) { int count = 0; do { String uname = con.readLine(null); char[] pwd = con.readPassword("Enter %s's password: ", uname); con.writer().write("\n\n"); } while (!auth && ++count < 3); } } }

  1. NullPointerException
  2. It works properly
  3. Compile Error : No readPassword() method in Console class
  4. null
Question 13 Multiple Choice (Single Answer)

interface I{ final class C1 { //1 static int i=9;; //2 } } class C2 implements I{ public static void main(String a[]){ System.out.println(I.C1.i); ///3 }}

  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