Description: programming languages Online Quiz - 137 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
Find the odd one?
Choose the illegal identifier?
JAVA ME applications can remain unsigned.
SSL connection can be established in JAVA ME based applications.
MIDP 2.0
What will be the output of following code? public class Main { public static void main(String[] args) { int values[] = {1,2,3,4,5,6,7,8}; for(int i=0;i<8; ++i) System.out.println(values[i++]); } }
Select the key words, which can not be used to define an identifier.
What will be output of following code? 1 double d = 10.10/0.0; 2 int i = 10/0;
What will be output of following code? 1 public class Main { 2 public static void main(String[] args) { 3 short a = 22; 4 execute(3); 5 System.out.println(a); 6 } 7 8 static void execute(short s){ 9 s = 33; 10 } 11 }
What will be output of following code ? 1 public class Main { 2 public static void main(String[] args) { 3 byte b = (int)2.12; 4 b = b + 3; 5 System.out.println(b); 6 } 7 }
What will be the output of following code? 1 public class Main { 2 public static void main(String[] args) { 3 float b = 2.12; 4 b = b + 3.10; 5 System.out.println(b); 6 } 7 }
What will be the output following code with executed with command ? >java Main 2 public class Main { private static int a = 2; private static int b; public static void main(String[] args) { b = Integer.parseInt(args[0]); a = a + b; System.out.println("a=" + a); System.out.println("b=" + b); } static{ a = 0; } }
What will be outcome of following code?
What will be output of following code? package test; import java.lang.Math.PI; public class Main { public static void main(String[] args) { System.out.println(PI); } }
What will be outcome of following code? List list = new ArrayList(); list.add(0, new Integer(42)); int total = list.get(0); System.out.println(total);
How much memory is allocated for objects of a class?
try{ throw int;} catch (float) catch (double) catch (int) catch (long) catch (...)
Why virtual functions are used ?
Can the private data members of a class be modified or accessed outside the class, without using member functions.
class A