Odd and Even
The program is simple, but the implementation needs some explaination.
To take input from the program , we use the
Scanner class, it is included as the
The class object needs to be initialized to use. The scanner object has the method
nextInt() to take in an integer, as there is another method for
nextLine() to take in a string.
input() method is used which takes in the prompt as a String parameter.