I have to create an application where I will print the result of a student. In the assignment we have to use the \t
, in order to tab everything in a good line.
for(int i = 0; i< 7; i++) {
System.out.println("Vak/Project :" + naamVak[i] + "\t\tCijfer: " +
inputCijfer[i] + "\tBehaalde studiepunten: " + studiepuntenVAK[i]);
}
It does print the name of the project (array called naamVak
), the result (inputCijfer
), and how many points they have got per project (studiepuntenVak
).
When I print the results to the console, it shows as follows:
Vak/Project :Fasten Your Seatbelts Cijfer: 1.0 Behaalde studiepunten: 0
Vak/Project :Programming Cijfer: 2.0 Behaalde studiepunten: 0
Vak/Project :Databases Cijfer: 3.0 Behaalde studiepunten: 0
Vak/Project :Personal Skills Cijfer: 4.0 Behaalde studiepunten: 0
Vak/Project :Project Skills Cijfer: 5.0 Behaalde studiepunten: 0
Vak/Project :Infrastructure Cijfer: 6.0 Behaalde studiepunten: 3
Vak/Project :Network Engineering 1 Cijfer: 7.0 Behaalde studiepunten: 3
How can I create the output to be all in a correct line?