JAVA HELP (Seperator)

wickedstangs

Well-known member
How do you do a Seperator in JAVA? This is what I have so far and I don't think its right but, it works:)

Code:
//Employee
public class Employee
{
public static void main(String[] args)
{
String name = "Susan Meyers";
String IdNumber = "47899";
String department = "Accounting";
String position = "Vice President";
 
String name2 = "Mark Jones";
String IdNumber2 = "39119";
String department2 = "IT";
String position2 = "Programmer";
 
String name3 = "Joy Rogers";
String IdNumber3 = "81774";
String department3 = "Manufacturing";
String position3 = "Engineer";
 
String NAM = "Name";
String IDNUMBE = "ID Number";
String DEPT = "Department";
String POS = "Position";
 
System.out.printf("%s %23s %23s %30s\n", NAM,IDNUMBE,DEPT,POS);
System.out.println("___________________________________________________________________________________\n");
System.out.printf("%s %13s %25s %30s\n", name,IdNumber,department,position);
System.out.printf("%s %15s %25s %30s\n", name2,IdNumber2,department2,position2);
System.out.printf("%s %15s %25s %30s\n", name3,IdNumber3,department3,position3);
 
}
}

This is what the output suppose to look like..
output.webp
 
Top Bottom