programming languages Online Quiz - 24
programming languages Online Quiz - 24
Questions
Can you inherit multiple interfaces?
- True
- False
What does the keyword virtual mean in the method definition?
- The method is public
- The method can be derived
- The method is static
- The method can be over-ridden
________________ refers to formatting data based on locale?
- Globalization
- Localization
- Impersonation
- Unicode program
Is it possible to store multiple data types in System.Array?
- True
- False
Do finally block get executed if the exception had not occurred?
- True
- False
Java allows multiple inheritance through
- Class
- Interface
- None
- Thread
Parameter passing in java is pass by reference
- True
- False
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"); } } }
- one
- two
- Compile error - char can't be permitted in switch statement
- Compile error - Illegal modifier for the class Test; only public, abstract & final are permitted
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 2 3
- Compile error , can't add primitive type in ArrayList
- Compile error on for(int i:list) , Incorrect Syntax
- 0 0 0
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");}
- Prints out: Exception Finally
- Prints out: Finally
- Prints out: Exception
- Compile with error
Which of the below statement is true about Error?
- An Error is a subclass of Throwable
- An Error is a subclass of Exception
- Error indicates serious problems that a reasonable application should not try to catch.
- An Error is a subclass of IOException
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); } }
- 0
- Compile with error
- null
- NullPointerException
Visual Basic is a
- Data Oriented Language
- Service Oriented Language
- Object Oriented Language
- Structured Oriented Language
Which keyword is used to prevent the values being changed?
- Static
- Const
- Preserve
- ReadOnly
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
- Return (Ans)
- Return Ans
- addNum = Ans
- addNum = Return Ans
Which window is used to show the values of variables that are in your code?
- Breakpoints
- Immediate window
- Properties window
- Watches window
What is the shortcut key to open the VB macro from excel?
- Alt + F11
- Alt + F10
- Ctrl + F10
- Alt + F8
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