Tag: programming languages

Questions Related to programming languages

Which of the following when turned on do not allow incompatible type conversion?

  1. Option Explicit

  2. Option Strict

  3. Option All

  4. All of the Above


Correct Option: B

List mylist = new ArrayList(); mylist.add(5); If you compile this lines in JAVA 1.5 , it will give compilation error.

  1. True

  2. False


Correct Option: B

What will be the output?public static void main(String[] args) { for (int i=0;i<= 10;i++){if( i>6) break;}System.out.println(i);}

  1. runtime exception

  2. 6

  3. 7

  4. comiple error.

  5. 10


Correct Option: D