1 Which of the following is the correct statement to return JAVA? A,toUpperCase(
ID: 3902499 • Letter: 1
Question
1 Which of the following is the correct statement to return JAVA?
A,toUpperCase("Java") "
B.Java".toUpperCase("Java")
C,"java".toUpperCase()
D,String.toUpperCase("Java")
2,The ________ method parses a string s to a double value.
double.parseDouble(s);
Double.parsedouble(s);
double.parse(s);
Double.parseDouble(s);
3,Which of the following expression is equivalent to (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)?
year % 4 == 0 && year % 100 != 0 || year % 400 == 0
(year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0)
(year % 4 == 0) && (year % 100 != 0 || year % 400 == 0)
D, year % 4 == 0 && (year % 100 != 0) || year % 400 == 0
4,
Assume x = 4 and y = 5, which of the following is true?
!(x == 4) ^ y != 5
x != 4 ^ y == 5
x == 5 ^ y == 4
x != 5 ^ y != 4
A,double.parseDouble(s);
B,Double.parsedouble(s);
C,double.parse(s);
DDouble.parseDouble(s);
Explanation / Answer
Q1
C option will return the correct result
Q2
D is the correct syntax for statement
Q3
Option a is correct as according to precedence it will be right answer
and B and D are also correct except C
Q4
The option B is correct as it will be equivalent to false xor true which is true
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.