4 ms·
how would you compile that? here's what i get: test.java:1: error: class, interface, or enum expected System.out.println("foobar"); ^ 1 error
by thefastlane 11y ago
how would you compile that? here's what i get:
test.java:1: error: class, interface, or enum expected
System.out.println("foobar");
^
1 error
- umanwizard 11y agoOh -- you're talking about the fact that you need to create a new class for your program's main method? Yes, this is true, but it has nothing to do with printing to stdout. Edit: I don't like Java and I've read the essay you're referring to. Please don't assume bad faith in other commenters. Your original post was factually wrong. There's enough wrong with Java that you don't need to make stuff up to criticize it.