Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

beginner of beginner

 
Lai Mister
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Henry Wong
author
Marshal
Pie
Posts: 21123
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rumesh Eranga
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20532
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest Notepad++ instead of Notepad because its higher feature set (Notepad is just poor for programming), but otherwise I agree.
 
Randall Twede
Ranch Hand
Posts: 4409
3
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i agree. follow the tutorial exactly for now. personally i don't use packages much, but they are trying to teach you something.
 
Jason Bullers
Ranch Hand
Posts: 111
8
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 48972
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe he only uses small applications which can all be fitted into the unnamed package.
 
Shannon Pitts
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic