Java programming multiple choice and one fill in the blank 1. What is the value
ID: 3882487 • Letter: J
Question
Java programming multiple choice and one fill in the blank
1. What is the value of d if the user enters 123?
double d = Double.parseDouble(kybd.next());
a. 123.0
b.0.123
c. the code does not compile because 123 is an int
2. Declare the variable i correctly
3. What is s after the following?
4. Consider
String team = "Durham Bulls";
Which statement will return that character 'B'?
a. char b = team.charAt(7);
b. char b = team[8];
c.char b = team[7];
5. Which of the following statement(s) are true given the code snippet
6. Consider
What is the difference between the following
String s3 = s0.concat(s1);
a. none, both are "abcd"
b. s2 is "cdab" s3 is "abcd"
c. none, both are "cdab"
2. Declare the variable i correctly
String s0 = "ab";
String s1 = "cd";
_____i = s0.compareTo(s1);
3. What is s after the following?
String s = "AbCd";
s.toLowerCase();
a. abCd
b. ABCD
c. AbCd
4. Consider
String team = "Durham Bulls";
Which statement will return that character 'B'?
a. char b = team.charAt(7);
b. char b = team[8];
c.char b = team[7];
Explanation / Answer
Explanation::
1) Answer is option a) 123.0
2) Answer ::
3) Answer ::
4) Answer::
5) Answer ::
6) Answer ::
Thank you!!
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.