Page 1 of 1

John works as a Software Developer for VenTech Inc. He writes the following code usingJava.public class vClass extends T

Posted: Fri Aug 26, 2022 9:54 am
by answerhappygod
John works as a Software Developer for VenTech Inc. He writes the following code usingJava.public class vClass extends Threadpublic 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?

A. The application will compile successfully and the values from 0 to 19 will be displayed as the output.
B. A compile-time error will occur indicating that no run() method is defined for the Thread class.
C. A runtime error will occur indicating that no run() method is defined for the Thread class.
D. The application will compile successfully but will not display anything as the output.