java - Hi i am trying to run a simple Odd even program but its giving me the error "identifier expected" -


this question has answer here:

hi trying run simple odd program giving me error "identifier expected" program follows:

import.java.io.*;  public class oddevenbufferedreader {   system.output.println("enter number checked odd or even: ");   bufferedreader br = new bufferedreader(new inputstreamreader(system.in));    public static void main(string args[]) {     int num, output;     num = integer.parseint(br.readline());     output = num % 2;     if (output == 0) {       system.out.println("entered number even");     } else {       system.out.println("entered number odd");     }   } } 

remove . between import , java.io.*;

import java.io.*; 

and put system.output.println , bufferedreader br lines inside main method.


Comments