Tag: technology

Questions Related to technology

    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
    1. Change public abstract class Vehicles { } to public class Vehicles { }
    1. Change public class Bus { } to public class Bus extends Vehicles { }
    1. Change public class MyClass { to private class My Class {
    1. Change public abstract class Vehicles { } to protected abstract class Vehicles { }

Correct Option: B