Question: Could you guys help me with these computer science questions I am terrible at JAVA If the String major = Computer Science, what is returned
Could you guys help me with these computer science questions I am terrible at JAVA
If the String major = "Computer Science", what is returned by major.charAt(1)?
A) 'C'
B) 'o'
C) 'm'
D) "C"
E) "Computer"
Which of the following would return the last character of the String x?
A) x.charAt(0); B) x.charAt(last); C) x.charAt(length(x)); D) x.charAt(x.length()-1); E) x.charAt(x.length());
Given String name = "Arleen Crabtree". What will the following instruction return?
name.toUpperCase().replace('R', 'Z');
A) "ARLEEN CRABTREE" B)"AZLEEN CZABTREE" C)"Azleen Czabtree" D)"Arleen Crabtree" E)"ArZleen CrZabtree"
What will be displayed by the following command?
System.out.println(Math.pow(3, 3-1));
A) 9 B) 8 C) 6 D) 4 E) 27
Step by Step Solution
There are 3 Steps involved in it
Lets go through each question step by step Question 1 If the String major Computer Science what is r... View full answer
Get step-by-step solutions from verified subject matter experts
