0
Alien head

programming languages Online Quiz - 23

Description: programming languages Online Quiz - 23
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

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


Correct Option: D

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


Correct Option: A

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

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

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

  2. null

  3. NullPointerException

  4. 0


Correct Option: B

10.Compilation of mxml file gives

  1. mxml file

  2. swf file

  3. as file

  4. Don't know


Correct Option: B

xml version =“1.0” encoding=”utf-8” ?> which tags are not mandatory for mxml file

  1. ?

  2. xml=”version”

  3. encode=”utf-8”

  4. None of the above


Correct Option: C

Sequence of Event Propagation

  1. bubbling-target-capturing

  2. target-bubbling-capturing

  3. capturing-target-bubbling

  4. Can't say


Correct Option: C

Flex Application requires Adobe Flash Player

  1. True

  2. False


Correct Option: A

5.Flex application implements RIA Concepts.

  1. True

  2. False


Correct Option: A

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


Correct Option: A

Can we create custom components ?

  1. Yes

  2. No

  3. Don't know

  4. No Idea


Correct Option: A

2.Which two languages are used in Flex?

  1. Java & C

  2. mxml & as

  3. C & C

  4. java & javascript.


Correct Option: B

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

  1. Box

  2. Application

  3. Button

  4. Panel


Correct Option: B

10.Compilation of mxml file gives

  1. mxml file

  2. swf file

  3. as file

  4. Don't know


Correct Option: B

xml version =“1.0” encoding=”utf-8” ?> which tags are not mandatory for mxml file

  1. ?

  2. xml=”version”

  3. encode=”utf-8”

  4. None of the above


Correct Option: C

Sequence of Event Propagation

  1. bubbling-target-capturing

  2. target-bubbling-capturing

  3. capturing-target-bubbling

  4. Can't say


Correct Option: C

Flex Application requires Adobe Flash Player

  1. True

  2. False


Correct Option: A

5.Flex application implements RIA Concepts.

  1. True

  2. False


Correct Option: A

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


Correct Option: A
+ View questions