Answer to Question #235707 in Java | JSP | JSF for Ema

Question #235707

design a java application that will allow a company to capture staff members contact numbers for adepartment .allow user to enter in a department name and then capture 5 staff members contact number


1
Expert's answer
2021-09-10T09:03:56-0400
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.print("Enter the department name: ");
        String departmentName = in.nextLine();
        String[] contactNumbers = new String[5];
        for (int i = 0; i < contactNumbers.length; i++) {
            System.out.print((i + 1) + " contact number: ");
            contactNumbers[i] = in.nextLine();
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS