1.What is the symbol that ends a coding statement in JAVA? Select one: a. // b. } c { d. ; 2.Based on the statement below, which of the list generates an error? Select one: a.x++ b. System.out.println("x is" + x); c. final int x=10; d. inty=y+ x;
hello I have 5 MCQ questions about java
1.What is the symbol that ends a coding statement in JAVA?
Select one:
a. //
b. }
c {
d. ;
2.Based on the statement below, which of the list generates an error?
Select one:
a.x++
b. System.out.println("x is" + x);
c. final int x=10;
d. inty=y+ x;
3.Based on the statement below, what will be the output?
int num =1;
switch(num)
{
case 1: System.out.println(*One”);
case 2: System.out.println(“Two");
case 3: System.out.println(“Three”);
default: System.out.println(*Above Three”);
}
Select one:
a.One
b. Two
c.One
Two
Three
Above Three 4
d.Three
4.What is the output of the statement below?
int a=5, b= 10, c= 15;
if(a>b&&b>c)
System.out.printin(“A is the biggest”);
else if(b>a&&a>c)
System.out.printin("B is the biggest);
else
System.out.printin(“C is the biggest”);
Select one:
a. Cis the biggest
b. There is an error because it does not have a { }
c. Bis the biggest
d.Ais the biggest
5.Based on the statement below, what will be the result?
Int age = 10;
Select one
a. age stores only an integer value
b. age will have a value 10
c. None of the above
d. The statement is wrong.
Step by step
Solved in 2 steps