1

I am really fresh at Java.

I'have created new Java Project. Created package Main and Main.java class Main in this package.

package Main;
public class Main {
 public Main(String[] argv) {
 System.out.println("Helloworld.");
 }
}

When I try to run it - Eclipse gives an error: Selection does not contain applet.

asked Feb 4, 2012 at 17:00

1 Answer 1

3

Don't create/run-as applet.

Some other notes:

1) main methods must be declared as follows in order to be recognized as an entry point:

public static void main(String[] argv) {
 // Your code here
}

The name of the parameter is arbitrary, but usually argv or args.

2) Packages should be named in all-lower case. Method names should start with a lower-case letter.

answered Feb 4, 2012 at 17:05
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.