Tag: programming languages

Questions Related to programming languages

Multiple choice technology programming languages
  1. It is possible for more than two threads to deadlock at once.

  2. The JVM implementation guarantees that multiple threads cannot enter into a

  3. Deadlocked threads release once their sleep() method's sleep duration has expired.

  4. Deadlocking can occur only when the wait(), notify(), and notifyAll() methods are

  5. It is possible for a single-threaded application to deadlock if synchronized blocks are

  6. . If a piece of code is capable of deadlocking, you cannot eliminate the possibility of

Reveal answer Fill a bubble to check yourself
A,F Correct answer
Multiple choice technology programming languages
  1. public int blipvert(int x) { return 0; }

  2. private int blipvert(int x) { return 0; }

  3. private int blipvert(long x) { return 0; }

  4. protected long blipvert(int x) { return 0; }

  5. protected int blipvert(long x) { return 0; }

  6. protected long blipvert(long x) { return 0; }

Reveal answer Fill a bubble to check yourself
A,C,E,F Correct answer
Multiple choice technology programming languages
  1. Change line 2 to:public int a;

  2. Change line 2 to:protected int a;

  3. Change line 13 to:public Sub() { this(5); }

  4. Change line 13 to:public Sub() { super(5); }

Reveal answer Fill a bubble to check yourself
C,D Correct answer
Multiple choice technology programming languages
  1. The instance gets garbage collected.

  2. The code on line 33 throws an exception.

  3. . The code on line 35 throws an exception

  4. The code on line 31 throws an exception

  5. The code on line 33 executes successfully

Reveal answer Fill a bubble to check yourself
B,C,E Correct answer