0
Alien head

programming languages Online Quiz - 24

Description: programming languages Online Quiz - 24
Number of Questions: 20
Created by:
Tags: programming languages

Can we create custom components ?

  1. Yes

  2. No

  3. Don't know

  4. No Idea

Answer: 1

2.Which two languages are used in Flex?

  1. Java & C

  2. mxml & as

  3. C & C

  4. java & javascript.

Answer: 2

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

  1. Box

  2. Application

  3. Button

  4. Panel

Answer: 2

What is the shortcut key to open the VB macro from excel?

  1. Alt + F11

  2. Alt + F10

  3. Ctrl + F10

  4. Alt + F8

Answer: 1

Which window is used to show the values of variables that are in your code?

  1. Breakpoints

  2. Immediate window

  3. Properties window

  4. Watches window

Answer: 4

Complete the code. Sub Demo() X = 4 Y = 5 Z = addNum(X,Y) Msgbox (Z) End Sub Function addNum(X,Y) Ans = X + Y <> End Function

  1. Return (Ans)

  2. Return Ans

  3. addNum = Ans

  4. addNum = Return Ans

Answer: 3

Which keyword is used to prevent the values being changed?

  1. Static

  2. Const

  3. Preserve

  4. ReadOnly

Answer: 2

Visual Basic is a

  1. Data Oriented Language

  2. Service Oriented Language

  3. Object Oriented Language

  4. Structured Oriented Language

Answer: 3

What is the output for the below code ? public class Test { public static void main(String[] args) { Integer i = null; int j = i; System.out.println(j); } }

  1. 0

  2. Compile with error

  3. null

  4. NullPointerException

Answer: 4

Which of the below statement is true about Error?

  1. An Error is a subclass of Throwable

  2. An Error is a subclass of Exception

  3. Error indicates serious problems that a reasonable application should not try to catch.

  4. An Error is a subclass of IOException

Answer: 1,3

What is the result of executing the following code, using the parameters 0 and 3 ?public void divide(int a, int b) { try { int c = a / b; } catch (Exception e) { System.out.print("Exception "); } finally { System.out.println("Finally");}

  1. Prints out: Exception Finally

  2. Prints out: Finally

  3. Prints out: Exception

  4. Compile with error

Answer: 2

What is the output for the below code ? public class Test { public static void main(String... args) { ArrayList list = new ArrayList(); list.add(1); list.add(2); list.add(3); for(int i:list) System.out.println(i); } }

  1. 1 2 3

  2. Compile error , can't add primitive type in ArrayList

  3. Compile error on for(int i:list) , Incorrect Syntax

  4. 0 0 0

Answer: 1

static public class Test { public static void main(String[] args) { char c = 'a'; switch(c){ case 65: System.out.println("one");break; case 'a': System.out.println("two");break; case 3: System.out.println("three"); } } }

  1. one

  2. two

  3. Compile error - char can't be permitted in switch statement

  4. Compile error - Illegal modifier for the class Test; only public, abstract & final are permitted

Answer: 4

Parameter passing in java is pass by reference

  1. True

  2. False

Answer: 2

Java allows multiple inheritance through

  1. Class

  2. Interface

  3. None

  4. Thread

Answer: 2

Do finally block get executed if the exception had not occurred?

  1. True

  2. False

Answer: 1

Is it possible to store multiple data types in System.Array?

  1. True

  2. False

Answer: 2

________________ refers to formatting data based on locale?

  1. Globalization

  2. Localization

  3. Impersonation

  4. Unicode program

Answer: 1

What does the keyword virtual mean in the method definition?

  1. The method is public

  2. The method can be derived

  3. The method is static

  4. The method can be over-ridden

Answer: 4

Can you inherit multiple interfaces?

  1. True

  2. False

Answer: 1
+ View questions