0

programming languages Online Quiz - 43

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

: What will be the size of the @fields array? my $record = ':a:b:c:'; my @fields = split(':', $record, -1);

  1. 0

  2. 1

  3. 3

  4. 5


Correct Option: D
  1. 59

  2. Compile time error, because you have to do int total = ((Integer)(list.get(0))).intValue();

  3. Compile time error, because can't add primitive type in List.

  4. Compile Properly but Runtime Exception


Correct Option: A

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


Correct Option: A

What is the output for the below code ? public class Test { public static void main(String... args) { String input = "1 fish 2 fish red fish blue fish"; Scanner s = new Scanner(input).useDelimiter("\s*fish\s*"); System.out.println(s.nextInt()); System.out.println(s.nextInt()); System.out.println(s.next()); System.out.println(s.next()); s.close(); } }

  1. 1 2 red blue

  2. Compile Error - because Scanner is not defind in java.

  3. 1 fish 2 fish red fish blue fish

  4. 1 fish 2 fish red blue fish


Correct Option: A

What are the languages the flex can be developed?

  1. ActionScript

  2. MXML

  3. HTML

  4. None of the above


Correct Option: A,B
- Hide questions