首页 > 解决方案 > 如何修复我每次运行时名为 adder 的静态扫描(但我已经更改了大写字母)代码抛出非法启动谁能修改问题

问题描述

import java.util.*;

public class RestuarantBill {
    
    public static void main(String[] args) {
        
        static Scanner adder = new Scanner(System.in);
            
            public static String enterItemName(int num) {
                System.out.printf("Enter name for item No %d: ", num);
                return in.nextLine();
            }
            
        //this is where my issue occurs with the static scanner

标签: java

解决方案


推荐阅读