Tag: programming languages

Questions Related to programming languages

    1. Classes in the same package
    1. All classes
    1. Only the class within the package that defined the method
    1. Classes that inherit access

Correct Option: A,D
    1. It jumps out of the loop back to the calling method.
    1. It jumps out of the loop to the next statement after the loop.
    1. It stops the execution of the program and of the virtual machine.
    1. It stops the innermost iteration and continues with the next iteration of the loop.

Correct Option: B
    1. From an int to a long
    1. From a byte to an int
    1. From a short to a byte
    1. From an int to a double
  1. 5) All of the above


Correct Option: E
  1. 1 int z = 0;

  2. 2 assert (z = 9);

  3. 3 assert (x ==5);

  4. 4 int z = 0;

  5. 5 boolean x = true;


Correct Option: C
    1. The program will run successfully with no errors or warnings.
    1. The program will halt with a runtime exception.
    1. The program will halt with a compiler error.
    1. The program will run successfully with no errors but a warning will be generated.

Correct Option: B
    1. 0000 0000 0000 0000 0000 0000 0000 0100
    1. 0000 0000 0000 0000 0000 0000 0000 1000
    1. 0000 0000 0000 0000 0000 0000 0001 0000
    1. 0000 0000 0000 0000 0000 0000 0000 0111
    1. 0000 0000 0000 0000 0000 0000 0000 1001

Correct Option: A