Hi i have a problem with this code and im not sure what i need to add to fix it:
HTML Code:package gtoj; public class GtoJ { public static void main(String[] args){ int YY; int DD; int MOD []= {31,28,31,30,31,30,31,31,30,31,30,31}; if (YY%400 == 0 || (YY% |DD|=0DD YY %4==0)) MOD [i]=29; } }
With the line that starts int MOD: it states "this array is only written to, never read from"
the next line with the "if" says
"varible YY may not have been intialized
illegal start of expression
variable DD miht not have been intialized
')' expected
variable decleration not allowed here
';' expected
cannot find symbol
variable i
location: classGtoJ"
Im not sure what it means, im not sure if i needed to declare the int YY and DD, also where do i input the dates that would be converted, also I'm not sure if i wrote the if statement correctly with the "|" and "!"
--- Update ---
also should i change the public static void.. to public static int?
would that work, each time i try it, the program tells me to add the static void
and Thanks in advanced for helping