我不断出错的情况下无法继续引用int

时间:2019-12-01 21:50:39

标签: java

import java.util.Scanner;

public class Banjoko_Debugging {

    public static void main(String[] args) {

        int num1;

        Scanner X = new Scanner (System.in);

        System.out.println("Please enter a integer that is between 5 to 500");

        num1 = X.nextInt();

        while (num1.integer()> 5 && num1.integer() <500) { //error

            System.out.println("Congratulations the input is correct" );

        }

0 个答案:

没有答案