Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem while coding #280

Open
VivekAmbegaonkar opened this issue Feb 2, 2022 · 1 comment
Open

Problem while coding #280

VivekAmbegaonkar opened this issue Feb 2, 2022 · 1 comment

Comments

@VivekAmbegaonkar
Copy link

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....!

@PranavPurwar
Copy link

It has to be sc.hasNextInt() and not sc hasNetInt()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants