Question: Look at the following array definition: String[] colors = {Blue,Green,Purple}; a. What will be returned by colors[2].length() when you print it to screen? b. What
Look at the following array definition:
String[] colors = {"Blue","Green","Purple"};
a. What will be returned by colors[2].length() when you print it to screen?
b. What will be returned by colors[1].charAt(0)when you print it to screen
c. What will be the output of System.out.println(colors[0].equals(colors[1]));
Step by Step Solution
There are 3 Steps involved in it
Here is the output of the code Length of colors2 6 First character of color... View full answer
Get step-by-step solutions from verified subject matter experts
