Description: programming languages Online Quiz - 192 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
In the init(ServletConfig) method of Servlet life cycle, what method can be used to access the ServletConfig object
What is the output of following piece of code ? int x = 2; switch (x) { case 1:System.out.println(”1?); case 2: case 3:System.out.println(”3?); case 4: case 5:System.out.println(”5?);
A method is defined in a class as : void processUser(int i) { } If this method is overriden in a sub class,
Stateful Session beans contain
Which of the following is true ?
Which is the data structure used to store sorted map elements
A Vector is declared as follows. What happens if the code tried to add 6 th element to this Vector new vector(5,10)
The Java interpreter is used for the execution of the source code.
Java runs on.
What type of inheritance does Java have?
class A extends Thread { public void run() { System.out.print("A"); } } class B { public static void main (String[] args) { A a = new A(); a.start(); a.start(); // 1 } }
class C1{ public void m1(){ // 1 } } class C2 extends C1{ //2 private void m1(){ } }
interface I{ void f1(); // 1 public void f2(); // 2 protected void f3(); // 3 private void f4(); // 4 } which lines generate compile time errors?
public static void main(String [] args) { int x = 5; boolean b1 = true; boolean b2 = false; if ((x == 4) && !b2 ) System.out.print("1 "); System.out.print("2 "); if ((b2 = true) && b1 ) System.out.print("3 "); } } What is the result?
What happens when you compare two primitives of different numerical types?
All exceptions inherit from
A class can define two methods with the same name as long as the return types are different
Assume the bit pattern of byte x is: 10110001. What will the sign of x be after x>>2?
Are you allowed to have more than one top-level(non-inner) class definition per source file?
What happens when you compare two primitives of different numerical types?