Q281
Open questionSelect an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
309
Questions
15/16
Page
Pick an option on a question to see the right answer and solution.
Q281
Open questionSelect an option to see the answer and solution.
Q282
Open questionSelect an option to see the answer and solution.
Q283
Open questionSelect an option to see the answer and solution.
Q284
Open questionimport java.util.*;
public class genericstack
{
Stack stk = new Stack ();
public void push(E obj)
{
stk.push(obj);
}
public E pop()
{
E obj = stk.pop();
return obj;
}
}
class Output
{
public static void main(String args[])
{
genericstack gs = new genericstack();
gs.push("Hello");
System.out.print(gs.pop() + " ");
genericstack gs = new genericstack();
gs.push(36);
System.out.println(gs.pop());
}
} Select an option to see the answer and solution.
Q285
Open questionclass Output
{
public static void main(String args[])
{
Double i = new Double(257.5);
boolean x = i.isNaN();
System.out.print(x);
}
}Select an option to see the answer and solution.
Q286
Open questionclass isNaN_output
{
public static void main(String args[])
{
Double d = new Double(1 / 0.);
boolean x = d.isNaN();
System.out.print(x);
}
}Select an option to see the answer and solution.
Q287
Open questionSelect an option to see the answer and solution.
Q288
Open question package pkg;
class display
{
int x;
void show()
{
if (x > 1)
System.out.print(x + " ");
}
}
class packages
{
public static void main(String args[])
{
display[] arr=new display[3];
for(int i=0;i<3;i++)
arr[i]=new display();
arr[0].x = 0;
arr[1].x = 1;
arr[2].x = 2;
for (int i = 0; i < 3; ++i)
arr[i].show();
}
}Select an option to see the answer and solution.
Q289
Open questionclass Output
{
public static void main(String args[])
{
Double i = new Double(257.5);
Double x = i.MIN_VALUE;
System.out.print(x);
}
}Select an option to see the answer and solution.
Q290
Open questionSelect an option to see the answer and solution.
Q291
Open questionclass Output
{
public static void main(String args[])
{
int a = Character.MIN_VALUE;
System.out.print((char)a);
}
}Select an option to see the answer and solution.
Q292
Open questionSelect an option to see the answer and solution.
Q293
Open questionimport java.lang.System;
class Output
{
public static void main(String args[])
{
long start, end;
start = System.currentTimeMillis();
for (int i = 0; i < 10000000; i++);
end = System.currentTimeMillis();
System.out.print(end - start);
}
}Select an option to see the answer and solution.
Q294
Open questionSelect an option to see the answer and solution.
Q295
Open questionSelect an option to see the answer and solution.
Q296
Open questionSelect an option to see the answer and solution.
Q297
Open questionclass Output
{
public static void main(String args[])
{
double x = 3.14;
int y = (int) Math.toDegrees(x);
System.out.print(y);
}
}Select an option to see the answer and solution.
Q298
Open questionSelect an option to see the answer and solution.
Q299
Open questionSelect an option to see the answer and solution.
Q300
Open questionSelect an option to see the answer and solution.