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.
Questions
1.Which tag is must for compilation of mxml file?
- Box
- Application
- Button
- Panel
2.Which two languages are used in Flex?
- Java & C
- mxml & as
- C & C
- java & javascript.
Can we create custom components ?
- Yes
- No
- Don't know
- No Idea
How to include mxml file?
- In Application tag
- In Script tag
- We can use either a or b
- None of the above
5.Flex application implements RIA Concepts.
- True
- False
Flex Application requires Adobe Flash Player
- True
- False
Sequence of Event Propagation
- bubbling-target-capturing
- target-bubbling-capturing
- capturing-target-bubbling
- Can't say
which tags are not mandatory for mxml file
- ?
- xml=”version”
- encode=”utf-8”
- None of the above
10.Compilation of mxml file gives
- mxml file
- swf file
- as file
- Don't know
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()); } }
- Compile error : No method name like lastEntry()
- null
- NullPointerException
- 0
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)); } }
- Compile error : No method name like floorKey()
- null
- NullPointerException
- 2
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); } } }
- NullPointerException
- It works properly
- Compile Error : No readPassword() method in Console class
- null
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 }}
- compile time error at line 1
- compile time error at line 2
- compile time error at line 3
- prints 9
- Runtime exception