I'm working on a javapgr. now, it's a school assignment. The program reads values between 0 and 9 into a table with lenght=10. I enter values and the table registers "1" for each time it's value is entered. My problem is that I don't want the program to print the result for a table if it's number wasn't entered.
tabHeltall is the name of the table, I thought I could check if the table was empty by checking if it was zero, and then just print a blank space in "else". But that din't work. -------- for(int indeks = 0; indeks < tabHeltall.length; indeks++){ if (tabHeltall = 0){ System.out.print(" "); } else { ---------
So what I really want to know is what to write to check if a slot in a table is empty. Or should I say, if a slot has not been written a value into.