Display Array for user input

astrofaireknightess's Avatar, Join Date: Mar 2010
Newbie Member
I'm trying to create a calendar program in Java. I am hoping to display an array of input fields for the user with each field corresponding to a given date. I want to allow the user to input appointments as strings. Since it is expected that some dates will contain no appointments (i.e. the array entry contains a null object) and the array is large I want the user to be able to select only the dates they want to fill. I've created the array:

String[][] march;
int i,j,a,b;
public void run()
{
march = new String[7][5];

But now I'm stuck how to display the array to the user.
0
virxen's Avatar, Join Date: Nov 2009
Pro contributor
because i can not understand what you want to do,do this.

imagine that you have the program ready as you want.
what would be the output?
simulate a simple execution of your program

for example

give me date:14/2/2010
give me description:xaxaxa
the appointment was set.
end of program.
0
theraptor's Avatar, Join Date: Mar 2010
Newbie Member
something like this?:

Code:
for (int row=0; row < march.length; row++) {
    for (int col=0; col < march[row].length; col++) {
        System.out.print(" " + march[row][col]);
    }
    System.out.println("");
}