1. Java code programming a.Declare an array of type int that will hold 50 numbers: b. Declare...
Question:
1. Java code programming
a.Declare an array of type int that will hold 50 numbers:
b. Declare an array of type String that will hold the innerplanets:
c. Print out Earth from the previous array.
d. What is the error you get when you attempt to access an arrayelement that is outside of the length of the array?
e. Write a method that takes in an array as a parameter andprints each element in the array on its own line:
f. Assuming we have a Planet class that encapsulates data on aplanet, write a new array declaration for all the planets in oursolar system that uses the Planet class:
g. Describe the relationship between variable length parameterlists and arrays.
h. Declare a 2D array representing the seating on a plane.Populate it with typical seat references of row and letter such as10C or 22A (using a nested loop):