+ 1

Why the Scanner Class is not Working in SoloLearn..

/* program to check Even or Odd number entered by User. */ import java.util.Scanner; class EvenOrOdd { public static void main (String args[]) { Scanner sc = new Scanner (System.in); System.out.println ("Enter No. to check Even or Odd "); int num = sc.nextInt(); if ( num % 2 == 0) { System.out.println (" Even Number"); } else { System.out.println (" Odd Number"); } } }

16th Oct 2017, 2:46 PM
Abhijeet S. Sonawane
Abhijeet S. Sonawane - avatar
5 ответов
+ 2
import java.util.Scanner; You missed ;
16th Oct 2017, 2:54 PM
Meharban Singh
Meharban Singh - avatar
+ 2
It works fine. Likely an issue with your internet connection.
16th Oct 2017, 3:51 PM
Rrestoring faith
Rrestoring faith - avatar
+ 1
Still not working.. the code working good in laptop, but not in Solo Learn
16th Oct 2017, 2:57 PM
Abhijeet S. Sonawane
Abhijeet S. Sonawane - avatar
+ 1
nope.. internet connection is good .. .. i think ther is problem in the version of app somehow.. i world like to report the problem, lets see what solLearn respond.
17th Oct 2017, 8:08 AM
Abhijeet S. Sonawane
Abhijeet S. Sonawane - avatar