This is what is says NumDaysLeftInYe ar.java:61: error: incompatible types
if (Year/4){
^
required: boolean
found: int
NumDaysLeftInYe ar.java:62: error: bad operand types for binary operator '&&'
if (Year/ 4 && Year/100)
^
first type: int
second type: int
User Profile
Collapse
-
Using If-Else-If statement but it keeps saying it is an invalid entry
...Code:System.out.println("Enter the day of the month. "); dayOfMonth = keyboard.nextInt(); System.out.println("Enter the month. "); monthName = keyboard.nextLine(); System.out.println("Enter the year. "); int Year = keyboard.nextInt(); if (Year/4){ if (Year/ 4 && Year/100) {isItLeapYear=true;} else if (Year/4 &&Last edited by Rabbit; Oct 23 '13, 05:31 AM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.
No activity results to display
Show More
Leave a comment: