programming languages Online Quiz - 103
Description: programming languages Online Quiz - 103 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
A static method can refer to any instance variable of the class.
Java runs on
What is an Applet?
What is Java?
The BorderLayout class provides static fields for
Which of the following statements about this code are true? class A extends Thread{ public void run(){ for(int i =0; i < 2; i++){ System.out.println(i); } } } public class Test{ public static void main(String argv[]){ Test t = new Test(); t.check(new A(){}); } public void check(A a){ a.start(); } }
What is the output for the below code ? class A implements Runnable{ public void run(){ System.out.println("run-a"); } } 1. public class Test { 2. public static void main(String... args) { 3. A a = new A(); 4. Thread t = new Thread(a); 5. t.start(); 6. t.start(); 7. } 8. }
What is the output for the below code ? 1. public class A { 2. int add(int i, int j){ 3. return i+j; 4. } 5.} 6.public class B extends A{ 7. public static void main(String argv[]){ 8. short s = 9; 9. System.out.println(add(s,6)); 10. } 11.}
Select correct answers