【发布时间】:2011-03-26 17:10:56
【问题描述】:
如果我有这个方法:public static int numberMonth(int parseMonth, String leapYear)
我将如何用这种方法打印出来:
public static void main(String[] args)
{
Boolean correctDate = false;
String date;
while (!correctDate)
{
// It is OK to embed the way you called the method checkInput(getInput())
// but for troubleshooting, it is easier for me to break into smaller steps.
// Request Date and get user response
date = getInput();
// Verfiy that the date entered contains a valid........
correctDate = checkInput(date);
// Display meesage to user
if (correctDate == true)
{
System.out.println("The date you entered is: " + date);
System.out.println(numberMonth);
System.out.println("The numerical date: " );
}
else
{
System.out.println("Please enter valid date ");
}
}
}
【问题讨论】:
-
问题标题和正文似乎不匹配。你能解释一下你的问题吗?
-
int nextmonth = MyClass.numberMonth(month, "some string"); System.out.println("Next month : " + nextmonth); -
parsemonth和leapYear表示什么? -
@spookyjon 'public static String jumpYear(String input) and public static int parseMonth(String input)
标签: java methods parameters