Question: a) Write a statement that declares a String array initialized with the following strings: Mercury, Venus, Earth, and Mars. b) Write a loop that displays

a) Write a statement that declares a String array initialized with the following strings: “Mercury”, “Venus”, “Earth”, and “Mars”.
b) Write a loop that displays the contents of each element in the array you declared in A.
c) Write a loop that displays the first character of the strings stored in each element of the array you declared in A.

Step by Step Solution

3.45 Rating (168 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Write a statement that declares a String array initialized with the following strings Mercur... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Starting Out With Java From Control Structures Questions!