컴파일 에러가 왜 뜨나요?

longkid8923 Reply 8 years 4 days ago
import java.util.Scanner; public class Main { String name; int[] hours = new int[7]; public Employee(String name, int[] hours) { this.name = name; this.hours = hours; } public int workingHours() { int sum = 0; for (int h : hours) sum += h; return sum; } public String toString() { return name + " " + workingHours(); } public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = input.nextInt(); Employee[] employees = new Employee[n]; for (int i = 0; i < n; i++) { String name = input.next(); int[] hours = new int[7]; for (int day = 0; day < 7; day++) hours[day] = input.nextInt(); employees[i] = new Employee(name, hours); } for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (employees[i].workingHours() < employees[j].workingHours()) { Employee tmp = employees[i]; employees[i] = employees[j]; employees[j] = tmp; } } } for (Employee e : employees) System.out.println(e); } } 일단 예제는 잘 돌아갑니다만 롱앤써가 아닌 컴파일 에러는 왜 뜨는건가요?
longkid8923 Reply 8 years 4 days ago
아 클래스명을 다 안바꿨네요 죄송 합니다 ㅠㅠ