I'm a beginner programmer, I'm currently attending classes for programming in Java (and other things, it's an IT course). I'm currently copying some basic code for a very basic program from my notebook to NetBeans 8.1.
I made sure the code is EXACTLY as we did in class, I have a photo of the board, I've seen lots of people with this error here and it almost always seems like a few extra braces or these being put somewhere else they shouldn't be in.
I tried removing and adding and changing place but nothing works. This is my code:
public static int Mayor (int a, int b){
if (a > b) {
return a;
}else{
if (a == b){
return -1;
}else{
return b;
}
}
}
Any help would be appreciated, thanks.