1. Engineering
  2. Computer Science
  3. could you guys help me with these computer science questions...

Question: could you guys help me with these computer science questions...

Question details

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

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution