#java
Вопрос:
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
Комментарии:
1. Вы не можете поместить метод в тело другого метода. Методы должны быть определены на уровне класса.