10/4
What is 2 ?
The decimal equivalent of 110100 binary is ____.
What is 52?
What is the output?
int x = 789;
if(x>700)
out.println("big");
else
out.println("little");
What is big ?
This is returned from arr[3] if arr={6, 3, 1, 2}
What is 2?
System.out.print("catastrophe".substring(4));
What is "strophe" ?
10/4.0
What is 2.5 ?
What is the value of x after the following sequence of statements?
x--;
x++;
What is the returned by the call go(-6) ?
public static int go(int x)
{
if( x > 0 )
return 1;
return 2;
What is 2 ?
What is output by the code below?
int[] array = {33,14,37,11,27};
out.println(array[array.length-1]);
What is 27 ?
System.out.print("catastrophe".substring(4,5));
What is "s" ?
11 / 2 * 3
What is 15 ?
What is the ASCII value of b?
What is 98?
What is output by the code below?
int w=100, x=88;
if(w>90)
if(x>80)
out.print("def");
else
out.print("xyz");
else
out.print("ghi");
out.print("fun");
What is deffun ?
What is output by the code below?
String[] ray = {"abc","ade","123","234","678"};
out.println(ray[5/2]);
What is 123 ?
System.out.print("catastrophe".indexOf("a"));
What is 1 ?
(int) (10.01 / 4.99)
What is 2 ?
What is the output by the code below?
int x = 9;
double y = x;
System.out.println(y);
What does the following evaluate to?
!(x || y) == ((!x) & (!y))
What is 9.0?
What does the following code fragment write to the monitor?
int height = 13; if ( height <= 12 ) System.out.print("Low bridge: "); System.out.println("proceed with caution.");
What is proceed with caution ?
int[] array = {5,10,3,6,9,15};
for(int i=0; i<array.length/2; i=i+2)
{
array[i]=array[array.length-i-1];
}
out.println(array[0]);
What is 15 ?
System.out.println(("13" + 5 + 3));
"catastrophe".substring(0);
What is 1353?
(double) (10/4)
What is 2.0 ?
What is the output by the code below?
String s = "abcdef";
System.out.println( s );
What is abcdef ?
int x=1;
while(x<5) {
System.out.print(x);
x++; }
What is 1234 ?
What is the output?
int[] nums = {5,8,9,6,3,0};
Arrays.sort(nums);
int loc = Arrays.binarySearch(nums,7);
What is -5 ?
System.out.print("catastrophe".length());
What is 11?