hi: i'm trying to make a simple java program which can determine whether a number is odd or even. I am 100% Completly new to java and just started, and so I do not understand most terms and such, so my apologies for that.
The Following code is wht i have got so far:
import java.util.*;
/**
* AWT Sample application
*
* @author
* @version 1.00 09/09/07
*/
public class Oddeven {
public static void main(String[] args) {
s = new Scanner(System.in);
int a
if(a % 2 == 0)
System.out.println("even");
else
System.out.println("odd");
}
}
and the error i got was:
java:12: cannot find symbol
symbol : variable s
location: class Oddeven
s = new Scanner(System.in);
^
Please help explain to me how to resolve my problem is a newbie friendly terms as possible..thanks again so much in advance.