Q101
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.
140
Questions
6/7
Page
Pick an option on a question to see the right answer and solution.
Q101
Open questionSelect an option to see the answer and solution.
Q102
Open questionclass recursion
{
int fact(int n)
{
int result;
if (n == 1)
return 1;
result = fact(n - 1) * n;
return result;
}
}
class Output
{
public static void main(String args[])
{
recursion obj = new recursion() ;
System.out.print(obj.fact(5));
}
}Select an option to see the answer and solution.
Q103
Open questionSelect an option to see the answer and solution.
Q104
Open questionSelect an option to see the answer and solution.
Q105
Open questionSelect an option to see the answer and solution.
Q106
Open questionSelect an option to see the answer and solution.
Q107
Open questionSelect an option to see the answer and solution.
Q108
Open questionSelect an option to see the answer and solution.
Q109
Open questionSelect an option to see the answer and solution.
Q110
Open questionSelect an option to see the answer and solution.
Q111
Open questionSelect an option to see the answer and solution.
Q112
Open questionSelect an option to see the answer and solution.
Q113
Open questionSelect an option to see the answer and solution.
Q114
Open questionclass box
{
int width;
int height;
int length;
}
class mainclass
{
public static void main(String args[])
{
box obj = new box();
System.out.println(obj);
}
}Select an option to see the answer and solution.
Q115
Open questionclass Output
{
public static int sum(int ...x)
{
return;
}
static void main(String args[])
{
sum(10);
sum(10,20);
sum(10,20,30);
sum(10,20,30,40);
}
}Select an option to see the answer and solution.
Q116
Open questionSelect an option to see the answer and solution.
Q117
Open questionclass box
{
int width;
int height;
int length;
int volume;
void volume(int height, int length, int width)
{
volume = width*height*length;
}
}
class Prameterized_method
{
public static void main(String args[])
{
box obj = new box();
obj.height = 1;
obj.length = 5;
obj.width = 5;
obj.volume(3,2,1);
System.out.println(obj.volume);
}
}Select an option to see the answer and solution.
Q118
Open questionSelect an option to see the answer and solution.
Q119
Open questionSelect an option to see the answer and solution.
Q120
Open questionSelect an option to see the answer and solution.