Open VivekAmbegaonkar opened 2 years ago
package Cwh; import java.util.Scanner;
public class examplenumber5 {
public static void main(String[] args) { System.out.println("enter the integer value"); Scanner sc = new Scanner(System.in);
System.out.println(sc hasNextInt()); } } In above code hasNextInt is not working,it shows an error while running this code please solve it for me....!
It has to be sc.hasNextInt() and not sc hasNetInt()
package Cwh; import java.util.Scanner;
public class examplenumber5 {
public static void main(String[] args) { System.out.println("enter the integer value"); Scanner sc = new Scanner(System.in);
System.out.println(sc hasNextInt()); } } In above code hasNextInt is not working,it shows an error while running this code please solve it for me....!