Ouputting data using system.out from array that's inside a loop JAVA : **The code below supposed to take the users input, name and bad/good teeth, ( allow the user to enter that in an array using a loop, 10 times and the program supposed to output that list of data in a table format ( the format you can find at the bottom of the code)   __ **
----------


import java.util.Scanner;


----------


public class pbclass;


----------


{
	public static void main(String[] args) 

	{
		pbclass objectt = new pbclass();
		objectt.dentistpractice();
	}


----------


	public void dentistpractice()
	{
		Scanner scan = new Scanner(System.in);
		String[] patientFamName = new String[10];
		String[] patientFirstName = new String[10];
		String[] PatientGoodTeeth = new String[10];
		String[] PatientBadTeeth = new String[10];
		for(int i = 0; i < 10; ++i)
		{
			System.out.println("Enter surname name ");
			patientFamName[i] = scan.nextLine();
			if (patientFamName[i].equalsIgnoreCase("close") ==true)
			{
				break;
			}
			System.out.println("Enter first name ");
			patientFirstName[i] = scan.nextLine();
			System.out.println("Enter good teeth ");
			PatientGoodTeeth[i] = scan.nextLine();
			int numconverterForHomeTeam = Integer.parseInt(PatientGoodTeeth[i]);
			System.out.println("Enter score for away team: ");
			PatientBadTeeth[i] = scan.nextLine();
			int numconverterForAwayTeam = Integer.parseInt(PatientBadTeeth[i]);
	}
		System.out.println(patientFamName[0] + patientFirstName[0] + " ||||||| " +PatientGoodTeeth[0]  + PatientBadTeeth[0] );
		System.out.println(patientFamName[1] + patientFirstName[1] + " ||||||| " +PatientGoodTeeth[1]  + PatientBadTeeth[1] );

}
   **the problem I am facing is that I do not know how to output the data in a simple way, as it is it works now, but what if the array was 1000 variables or even longer? and how do I prevent 'null' from showing on the display table if the user types 'exit' the loop should stop and display the already inputted data excluding null values)**