Hi,
this is an exercise I wrote:
public class Konverter {
//private Euro e = new Euro(14.4);
public static void main (
String[] args){
private Euro e = new Euro(14.4);
}
}
Compiler:
Konverter.java:12: illegal start of expression
public Euro e = new Euro(14.4);
^
I I remove 'public', there's no error. Also, if I remove the slashes in the second line, it gets compiled. I think I missed something important here: Why is it there are no modifiers allowed here?