(a) an input function that reads the month as an integer,
(
Test your class in a new program which has the main() method.
Why i can not displayed this input program?
Answer a
public class month {
public static void main (String[] args) {
{
int month
month [ ] month = new month [12];
month[0] = new month ( "1")
month[1] = new month ( "2")
month[2] = new month ( "3")
month[3] = new month ( "4")
month[4] = new month ( "5")
month[5] = new month ( "6")
month[6] = new month ( "7")
month[7] = new month ( "8")
month[8] = new month ( "9")
month[9] = new month ( "10")
month[10] = new month ( "11")
month[11] = new month ( "12")
System.out.printIn("Month Of Integer:");
System ( int counter=0; <= 12; counter== ){
month [ counter ] .
}
}//main
}//class
}
Answer b
public class month {
public static void main (String[] args) {
{
int month
month [ ] month = new month [12];
month[0] = new month ( "JAN")
month[1] = new month ( "FEB")
month[2] = new month ( "MAC")
month[3] = new month ( "APR")
month[4] = new month ( "MEI")
month[5] = new month ( "JUN")
month[6] = new month ( "JUL")
month[7] = new month ( "OGO")
month[8] = new month ( "SEP")
month[9] = new month ( "OKT")
month[10] = new month ( "NOW")
month[11] = new month ( "DIS")
System.out.printIn("Name Of Month:");
System ( int counter=0; <= 12; counter== ){
month [ counter ] .
}
}//main
}//class
}

New Topic/Question
Reply




MultiQuote








|