HOw to check for EOf in java ...when the input if a BIgInteger.
Scanner sc= new Scanner(System.in)while(sc.nextBigteger !=-1){//} is the above code correct with respect to check the input?
Have a look at the API - theres a hasNext... method for each input type, or it will throw an exception.. it definitely won't return -1.