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
a Write a statement that declares a String array initialized with the following strings Mercur... View full answer
Get step-by-step solutions from verified subject matter experts
