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;

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 14RQ
icon
Related questions
Question

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.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Top down approach design
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT