I write some coding i want to get 2 output like
Example (1) of object Employee:
Id#
Name :
Age:
Sex:
etc.
Example (2) of object Employee:
Id#
Name :
Age:
Sex:
etc.
i just dont want a long code..
import java.io.*;
import java.util.Scanner;
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int i =0;
int[] iDNumber = new int[5];
String name;
int age;
String sex;
Scanner scan = new Scanner(System.in);
Employee employ = new Employee();
String two;
System.out.print("Please enter an ID number: ");
iDNumber[1] = scan.nextInt();
employ.setIDNumber(iDNumber);
System.out.print("Please enter the employees name: ");
name = scan.nextLine();
name = scan.nextLine();
employ.setName(name);
System.out.print("Please enter the employees age: ");
age = scan.nextInt();
employ.setAge(age);
System.out.print("Please enter employees sex: ");
sex = scan.next();
employ.setSex(sex);
System.out.print("Please enter the employees Salary ");
double salary = scan.nextDouble();
employ.setSalary(salary);
System.out.print("Please enter the employees jobtitle ");
String jobTitle = scan.nextLine();
jobTitle = scan.nextLine();
employ.setJobTitle(jobTitle);
System.out.print("\n\n\n\n\n\n\n\n\n\n\n\n");
String ONE = employ.employee1();
two = employ.employee1();
System.out.println(ONE + "\n" + two);
}
}