Answer to Question #108203 in Java | JSP | JSF for Lavi

Question #108203
Question 2. Choose one answer of the following multiple choice questions:
1-What is displayed by: System.out.println("1" + 2 + 3);
a) 6
b) 15
c) 123
d) a syntax error

2-What is the number of loops in the following for statement?
for( int i = 0; i < n; i++ ) { // statement; }
a) Infinite loop
b) n
c) n - 1
d) n + 1

3-What is the returnValueType of the following method?
public static _____________ myMmethod(byte x, double y) {
return (long)x / y * 2; }
a) int
b) byte
c) long
d) double

4-Which two are acceptable data types for x?
switch( x ) {
default: System.out.println("Hello");
}
a) byte and char
b) long and short
c) char and double
d) float and int

5-What is the value of str2 after the following statements are executed?
String str1, str2, str3 = "Today is Wednesday.";
str1 = str3.substring(9, 18);
str2 = str1.substring(0, 3);
a) Tod
b) Wed
c) Wedn
d) Is
1
Expert's answer
2020-04-05T16:24:40-0400
Dear Lavi, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS