Need help for JaVa
Write both sections in the same package. Part A. Write a program PartA and implement the following in the main method 1. Declare an array arr1 and initialize it to 1, 2, 3, 4, 5, 6, 7, 8, and 9 (From this point on, use the variable length instead of a number to define the capacity of the array.) 2. Declare another array arr2, same length of arr1, without entering any integers. 3. Using a for loop print arri displaying all elements on one line, separated by a comma (commas must be placed only between numbers). 4. Using a while loop, print arr2 displaying all elements on one line, separated by a dash (dashes must be placed only between numbers). 5. Using a for loop, copy all the values of arr1 into arr2 in reverse order, 6. Using a while loop copy all elements of arr1 into arr2 in reverse order. 7. Using a do/while loop print arr1 displaying all elements on one line, separated by a Comma 8. Using a for loop, print arr2 displaying all element on one line, separate by a dash. Expected output Array 1: 1,2,3,4,5,6,7,8,9 Array 2: 0-0-0-0-0-0-0-0-0 Array 1: 1,2,3,4,5,6,7,8,9 Array 2: 9-8-7-6-5-4-3-2-1 Part B Write a program PartB, that contains an array of five names and another array of five passwords (your choice). Use the following Names/Passwords in your string arrays (case sensitive) Bob jelly Jane clock Jill tree Sean computer Mel chip Your program should ask the user to enter a name and a password. If the user enters the correct name with its related password, grant access. If the user enters the wrong name/password (can be either or both), allow the user to re-try only once. If the user still cannot enter the correct name/password, display the following: "Sorry, your name/password does not match our database. Contact the administrator