Tag: technology

Questions Related to technology

  1. Basic Checkpoint

  2. Intermediate Checkpint

  3. Symbolic Checkpint

  4. Para-symbolic checkpint


Correct Option: C
  1. foreach( x ) System.out.println(z);

  2. for( int z : x ) System.out.println(z);

  3. while( x.hasNext() ) System.out.println( x.next() );

  4. for( int i=0; i< x.length; i++ ) System.out.println(x[i]);


Correct Option: B,D

Given: 1. public class Plant { 2. private String name; 3. public Plant(String name) { this.name = name; } 4. public String getName() { return name; } 5. } 1. public class Tree extends Plant { 2. public void growFruit() { } 3. public void dropLeaves() { } 4. } Which statement is true?

  1. The code will compile without changes.

  2. The code will compile if public Tree() { Plant(); } is added to the Tree class.

  3. The code will compile if public Plant() { Tree(); } is added to the Plant class.

  4. The code will compile if public Plant() { this("fern"); } is added to the Plant class

  5. The code will compile if public Plant() { Plant("fern"); } is added to the Plant class.


Correct Option: D
  1. Alternate PCB

  2. IO PCB

  3. Database PCB

  4. Any one


Correct Option: B

Given: 1. public class Threads2 implements Runnable { 2. 3. public void run() { 4. System.out.println("run."); 5. throw new RuntimeException("Problem"); 6. } 7. public static void main(String[] args) { 8. Thread t = new Thread(new Threads2()); 9. t.start(); 10. System.out.println("End of method."); 11. } 12. } Which two can be results? (Choose two.)

  1. java.lang.RuntimeException: Problem

  2. run.java.lang.RuntimeException: Problem

  3. End of method.java.lang.RuntimeException: Problem

  4. End of method.run.java.lang.RuntimeException: Problem

  5. run.java.lang.RuntimeException: ProblemEnd of method.


Correct Option: D,E
  1. High intensity

  2. Modified Data Tag

  3. Protected

  4. Numeric


Correct Option: B
  1. Basic Test Screen

  2. Batch Test Screen

  3. Batch Terminal Simulator

  4. Batch Terminal Selection


Correct Option: C

Given: 1. public class TestSeven extends Thread { 2. private static int x; 3. public synchronized void doThings() { 4. int current = x; 5. current++; 6. x = current; 7. } 8. public void run() { 9. doThings(); 10. } 11.} Which statement is true?

  1. Compilation fails.

  2. An exception is thrown at runtime

  3. Synchronizing the run() method would make the class thread-safe.

  4. The data in variable "x" are protected from concurrent access problems.

  5. Declaring the doThings() method as static would make the class thread-safe.

  6. Wrapping the statements within doThings() in a synchronized(new Object()) { } block would make the classthread-safe.


Correct Option: F