Question: Java programming assignment #6. Using Netbeans. this program we are using arrays, sorting, regular expressions, methods, and exceptions. I am very confused on how to
Java programming assignment #6. Using Netbeans. this program we are using arrays, sorting, regular expressions, methods, and exceptions. I am very confused on how to even approach this program. please help, my professor will not help.


Arrays is located right after the first An array is a fixed length sequential list of elements. Sequential means that the second element element and the third element is right after the second element and so forth. This means you can use an index to identify an element within the array. Fixed length means the total number of elements is a constant. In Java, arrays are objects so you must create the array using the keyword new. Also, arrays are 0-based, that means the first element is located at position (or index) 0, the second element at 1, and so forth. To avoid confusion, try to avoid saying first element, second element, and instead refer to the element at postion 0, the element at postion 1, etc Declaring and Creating Arrays int x int Above, and y are both declared to be an array of integers. The Dis what distinguishes an array from just a single integer. Notice the O can go on the variable or on the type. Since arrays are objects, technically reference to an array y. We have not created the array yet so at this point x and y are null references. The keyword new is used to create an array new int 15 new is used to create an array rs can be assigned one a a time number 40 x 13 30 20 10 loops are used extensively in process ng arrays or we can use a loop i 10 i 5 i++ int i for niti alization list to create an array You can also use an 20, 30 40 10 int y Simple Array Processing import java util Scanner public class Example public static float getAverage lint g 0.0f float sum i g,length it+ for int i sum g. length return public static int getHighest int g int hi i g. length int i it for hi if hi return hi public static void main String arg new int int X Scanner input IO. get Input Enter 5 integers input inextInt int i 0 i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
