Home » questions » In Java can i = int ?
In Java can i = int ?
For my assignment I need to make a class for a program. In the test program I see an "i". Does it stand for int, or is it an instance or something, that stands for invalid?
//***********************************************
// Month Class Demo Program 1 *
//***********************************************
public class MonthDemo1
{
public static void main(String[] args)
{
// Use the default constructor.
Month m = new Month();
System.out.println("Month " + m.getMonthNumber() +
" is " + m);
// Set the month number to the values 0 through 12
// (0 is invalid), and display the resulting month name.
for (int i = 0; i <= 12; i++)
{
m.setMonthNumber(i);
System.out.println("Month " + m.getMonthNumber() +
" is " + m);
}
}
}

Answers
Neussendorfera
On 2006-08-03 10:48:21
tmo419
On 2006-08-03 13:36:40
sree l
On 2006-08-03 10:55:02
D
On 2006-08-03 10:48:20
frime
On 2006-08-03 11:42:29
thegooddeal2000
On 2006-08-03 11:33:04
Pands
On 2006-08-03 11:21:58