im using the book java in 24 hours.
i still need to learn about input but disregard that
i only wanna know you opinians about my code
thanks for your support
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.util.*;
/**
*
* @author Jan
*/
public class Students {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
//input system!!
String[][] namesAv = new String[50][3];
boolean input = false;//THIS BOOLEAN IS FALSE BECAUSE DE INPUT SYSTEM ISNT READY!!!!!!!!!!!!!!!!
char chInput = '0';
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int i = 0, si = 0;
while(input){
System.out.println("Geef de naam van de student?");
////System.in.blabla(namesAv[i][si];
i++;
System.out.println("Geef de punten van de eerste helft?");
i++;
si++;
////System.in.blabla(namesAv[i][si];
System.out.println("Geef de punten van de tweede helft?");
////System.in.blabla(namesAv[i][si];
i++;
si++;
System.out.println("Druk c om meer inputs te doen!");
System.out.println("Druk q om te stoppen met de input!");
//note ik ken het input systeem van java niet!!!!!!!!!!!!!!!!!!!!
//NOTE I DONT KNOW THE INPUT CLASSES OF JAVA SO NEED TO LEARN THAT FIRST!!!!!!!!!!!!!!!!!!!!
if(chInput == 'c'|| chInput == 'C')
input = true;
if(chInput == 'q'|| chInput == 'Q')
input = false;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//THIS HARD CODED ARRAY IS BECAUSE I NEED TO LEARN ABOUT INPUT
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
namesAv[0][0] = "jan"; namesAv[0][1] = "50";
namesAv[1][0] = "eefje"; namesAv[1][1]= "100";
namesAv[2][0] = "baltazar";
namesAv[3][0] = "xavier";
namesAv[4][0] = "carmen";
namesAv[5][0] = "bieke";
namesAv[6][0] = "teefje";
int length = 0;
while(namesAv[length][0] != null){length++;}
i = 0;
while(i < length){
System.out.print(namesAv[i][0]+" ");
if(namesAv[i][1] != null)
System.out.print(namesAv[i][1]+" ");
if(namesAv[i][2] != null)
System.out.println(namesAv[i][2]);
else {System.out.println();}
i++;
}
}
}