programming languages Online Quiz - 209
Description: programming languages Online Quiz - 209 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
How long does the following code run? for(int x=0; x=3; x++)
Any class that implements the Runnable interface has to provide the implementation for the following methods public void start(); public void run();
What is the result of trying to compile and run the following code. public final static void main(String[] args){ double d = 10.0 / -0; if(d == Double.POSITIVE_INFINITY) System.out.println("Positive infinity"); else System.out.println("Negative infinity"); }
What is the result that will be printed out ? void aMethod() { float f = (1 / 4) * 10; int i = Math.round(f); System.out.println(i); }
What is the result that will be printed out ? void aMethod() { float f = (1 / 4) * 10; int i = Math.round(f); System.out.println(i); }
What will happen if you try to compile and run this ? public class Test{ static{ print(10); } static void print(int x){ System.out.println(x); System.exit(0); } }
ZZZ (Duplicate) - What is the output of the following, StringBuffer sb1 = new StringBuffer("Debopam"); StringBuffer sb2= new StringBuffer("Debopam "); String ss1 = " Debopam "; System.out.println(sb1==sb2); System.out.println(sb1.equals(sb2)); System.out.println(sb1.equals(ss1)); System.out.println("Poddar".substring(3));
Identify whether the following statement is true or false.
The keyword synchronized can be used with only a method
Reflection (introspection) is querying a class about its properties, and operating on methods and fields by the name for a given object instance. Why is reflection possible in the Java language?
Handling an exception allows a program to terminate execution