Scroll to see replies
Spoiler
static boolean isLeapYear (int year){
if (...)
return ...;
else
return ...;
}
and then in main, after receiving the year from the user you could have something like:public static void main (String[] args) {
if (isLeapYear(year))
...
else
...
}
Also, I'm not sure whether it's pastebin, but the whitespace seems very off and it's making things hard to follow.static boolean isLeapYear (int year){
if (...)
return ...;
else
return ...;
}
and then in main, after receiving the year from the user you could have something like:public static void main (String[] args) {
if (isLeapYear(year))
...
else
...
}
Also, I'm not sure whether it's pastebin, but the whitespace seems very off and it's making things hard to follow.Last reply 3 minutes ago
Bank Of england degree apprenticeship 2024Last reply 8 minutes ago
Feeling inferior compared to syrians as a half moroccan/half whiteLast reply 10 minutes ago
Edexcel A Level Business Paper 1 (9BS0 01) - 14th May 2024 [Exam Chat]Last reply 14 minutes ago
LSE International Social and Public Policy and Economics (LLK1) 2024 ThreadLast reply 17 minutes ago
Atkins Degree Apprenticeship 2024Last reply 22 minutes ago
Official UCL Offer Holders Thread for 2024 entryLast reply 27 minutes ago
Official University of St Andrews Applicant Thread for 2024Last reply 37 minutes ago
Learn Direct - Vet science Unit 9 HELPLast reply 47 minutes ago
LSE undergraduate accommodationLast reply 52 minutes ago
The Official Cambridge Applicants for 2025 Entry ThreadLast reply 52 minutes ago
Airbus degree apprenticeships 2024Last reply 54 minutes ago
Official University of Edinburgh Applicant Thread for 2024Last reply 1 month ago
Free website hosting providers with no strings attached?Posted 3 months ago
iDEA silver citizen badge three. Milkshake shack coding problem.Last reply 4 months ago
How do you practice programming java for beginners?Last reply 8 months ago
iDEA run code error worker resolution badgeLast reply 1 month ago
Free website hosting providers with no strings attached?Posted 3 months ago
iDEA silver citizen badge three. Milkshake shack coding problem.Last reply 4 months ago
How do you practice programming java for beginners?Last reply 8 months ago
iDEA run code error worker resolution badge