GSSP-JAVA Free Sample Questions

Gssp-Java Practice Test
2/10 questions ยท Unlock full access
Q1Multiple answers

Which of the following elements are the subelements of the mime-mapping element in a deployment descriptor file?Each correct answer represents a complete solution. Choose all that apply. A.exception-typeB.error-codeC.extensionD.mime-typeE.servlet-class

Q2

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? 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.