nerdexam
GIAC

GSSP-JAVA · Question #226

GSSP-JAVA Question #226: Real Exam Question with Answer & Explanation

Sign in or unlock GSSP-JAVA to reveal the answer and full explanation for question #226. The question stem and answer options stay visible for context.

Question

John works as a Software Developer for VenTech Inc. He writes the following code using Java. public class vClass extends Thread { public static void main(String args[]) { vClass vc=new vClass(); vc.run(); } public void start() { for(int k=0;k<20;k++) { System.out.println("The value of k = "+k); } } } What will happen when he attempts to compile and execute the application?

Options

  • AThe application will compile successfully and the values from 0 to 19 will be displayed as
  • BA compile-time error will occur indicating that no run() method is defined for the Thread
  • CA runtime error will occur indicating that no run() method is defined for the Thread class.
  • DThe application will compile successfully but will not display anything as the output.

Unlock GSSP-JAVA to see the answer

You've previewed enough free GSSP-JAVA questions. Unlock GSSP-JAVA for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full GSSP-JAVA Practice