This my class employes
public class Employe {
public int noEmploye;
public String nom;
public int departement;
public double salaireBrut;
public double impots;
public double rrgc;
public double assEm;
public double salaireNet;
public double SalaireAnnuel;
public double suplemetaire;
}
This my main
Employe emp = new Employe();
emp.noEmploye=123;
emp.nom= superman;
emp.departement= 4;
How to put emp.noEmploye,emp.nom,emp.departement in an array row
Whit an output like [123,superman,4]
Thank for helping me
Frank
Write a
toStringfunction for yourEmployeeclass which does any formatting you wish, and then simplySystem.out.printlnany instance ofEmployee.If you write for example
and then you create a Collection of such objects, you will get an output like