[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Please send email if you are having login problems - see the posts below for more info.
Hotmail and Yahoo! users - please see the Hotmail post or the Yahoo! post for information on lost emails.
Wizard template and sample code are different.  XML
Forum Index » New to Java
Author Message
edndori

Newbie

Joined: 07/07/2009 13:47:57
Messages: 1
Offline

I’m brand new to Java.
The code line
“class ArrayDemo {“
appears in a tutorial code example.
The template set up by the wizard has these two lines which look like they should serve the same purpose
“package arraydemo;”
“public class Main {“
Can you explain whats going on here?
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

I'm not sure what environment you're using (Netbeans?, Eclipse?) but if only the class name is different (ArrayDemo vs Main) you should be ok. The Main class has a package declaration too which means you'll have to run the code a little differently but it isn't too bad.

Try out the demo and let us know if you get stuck.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
 
Forum Index » New to Java
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2011 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle