I'm beginig with Java. Tried to do the first code from first chapter. After creating of the class Party I used JVM. And got error: main method not found in class party. please define the main method as: public static void main<String args> or a JavaFX application class must extend javafx.application.Application
What have I done wrong?
Egor: Head First Java often leaves out this kind of "boilerplate" code so that the examples are shorter.
wu: Thanks for the solution. Just so you know, we usually don't give complete solutions here, but instead offer advice to help the OP arrive at their own conclusion -- although snippets of code are fine. Also, you shouldUseCodeTags (that's a link). It makes your code look much better. I'll put them in for you this time.
All things are lawful, but not all things are profitable.
Please checkout the Java Tutorials http://docs.oracle.com/javase/tutorial/ if you get frustrated with "Head First". I have not used Head First, since one early attempt with Java EJBs, but I have frequently found answers for various things in the tutorials.