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