Question
5. Using the following declarations and a member of the Array class, int [ ] bArray = new int [10]; int location; Using a method
5. Using the following declarations and a member of the Array class,
int [ ] bArray = new int [10];
int location;
Using a method in the Array class, write a statement that would change the order of the elements in the bArray array. The contents of the first cell should hold what was in the last cell. The second cell should hold what was in the next to last cell.
__________________________
HINT: You must write the full statement which includes a call to a method in the Array class.
6. ____________ would create an array declaration to hold the names of five font strings. Use font as your identifier. HINT: Your declaration must be syntactically correct, complete with an ending semicolon.
7. _____________ would create an array declaration and do a compile-time initialization to hold the 5 most common single character middle initials. The most common are A, N, R, S and T. Use middleInitial as your identifier. HINT: Your declaration must be syntactically correct, complete with an ending semicolon.
8. Assume you have a method heading that reads
public static void DoSomething (int [ ] temp)
A call to invoke the method sending in the array would look like:
______________________________________
HINT: Your declaration must be syntactically correct, complete with an ending semicolon.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started