File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes beginner of beginner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "beginner of beginner" Watch "beginner of beginner" New topic
Author

beginner of beginner

Lai Mister
Greenhorn

Joined: Dec 26, 2011
Posts: 1
hi fellow moose,

i am super exciting to beginning learn a new language, Java

at same time there are so many question left to be answers T_T

at the moment, im following "Head First Java, 2nd ed." by Sierra and Bates
netbeans 7.0 (java compiler)

im following this guide to create my first program
http://docs.oracle.com/javase/tutorial/getStarted/cupojava/netbeans.html

in the "New Java Application" screen where it said "Create Main Class"
my question is:
is it necessary to put "helloworldapp.HelloWorldApp"?
can i leave one of them out, "helloworld" or "HelloWorldApp"

thanks


material used to learn Java:
Head First Java, 2nd ed, Sierra & Bates
netbeans-7.0.1 (java compiler)
jdk-6u30-windows-x64
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18548
    
  40

Lai Mister wrote:
is it necessary to put "helloworldapp.HelloWorldApp"?
can i leave one of them out, "helloworld" or "HelloWorldApp"


You can name a class whatever you want. And put it into any package that you want. However, if you do, the tutorial will be slightly different. I highly recommend, that for the first few examples at least, you try to minimize deviation from the tutorial.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Rumesh Eranga
Ranch Hand

Joined: Jan 26, 2011
Posts: 34
Why don't you start with notepad?

Start with notepad till you feel satisfy with language little bit and then try to move on to an IDE.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19656
    
  18

I suggest Notepad++ instead of Notepad because its higher feature set (Notepad is just poor for programming), but otherwise I agree.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

i agree. follow the tutorial exactly for now. personally i don't use packages much, but they are trying to teach you something.


SCJP
Visit my download page
Jason Bullers
Greenhorn

Joined: Dec 27, 2011
Posts: 28

Randall Twede wrote:personally i don't use packages much...


Really? How come? Packages are extremely helpful for organizing your application's classes and offer the benefit of encapsulating aspects of a design. In really large programs, they're absolutely essential.

I'm honestly curious as to how you go about structuring your classes.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38087
    
  22
Maybe he only uses small applications which can all be fitted into the unnamed package.
Shannon Pitts
Greenhorn

Joined: Dec 30, 2011
Posts: 13
This is my biggest frustration with every Java tutorial I've found so far-- they tell you WHAT to do, but not WHY you're doing it, so once you're working on something that is not that exact project, you have no idea whether or not you should be applying that thing in the same way.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: beginner of beginner
 
Similar Threads
NetBeans IDE 5.0 = how to connect my database
Financial Portfolio
little bit confused where to post
help implementing a simple Line class
storing multiple attributes for one entity