java - 如何修复我每次运行时名为 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
解决方案
推荐阅读
- ms-access - MS Access (Office 365) 中的 SQL 查询的奇怪问题
- python - 一旦我尝试用画布创建图像,所有小部件都会消失
- azure - Azure IoT Edge 安装中的配置错误 - “配置具有正确的守护进程管理端点的 URI - 错误”
- android - Android滑块主题二次色不改为什么?
- google-play - 如何在 Google Play 商店中设置不同的语言?
- ruby-on-rails - Rails Admin 与 Mobility gem 的集成
- azure-aks - AKS 负载均衡器 IP 地址不可访问
- wordpress - 摘录wordpress中的音频播放器
- android - 使用 Retrofit + Rx 链接 API 请求
- sql - 使用 SQL Server 将一列中的字符串中的多个值拆分为多列