Syntax error on token “;”, “{” expected after this token
问题 Just a simple class calls a class that prints an array. I get a syntax error in Eclipse. I also get an error that I don't have a method called Kremalation. public class AytiMain { public static void main(String[] args) { AytiMain.Kremalation(); } } public class Kremalation { String[] ena = { "PEINAW", "PEINOUSA", "PETHAINW" }; int i; // <= syntax error on token ";", { expected after this token for (i = 0; i <= ena.lenght; i++) System.out.println(ena[i]); } } 回答1: You have code (which is not