This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Starting a package  RSS feed

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most difficult part is what should be done first. I am wondering how should I use my main and constructors when I will be using arrays and strings? Basically what are the difference between the two?

 
Bartender
Posts: 563
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow! Almost any answer would be right to such a wide open question. My kind of question!

As for what should be done first, always start at the beginning.

You're wondering about the differences between the main() method and constructors? I suggest you consult the Java tutorials for a more complete answer, but in short: the main() method is the entry point for any Java program, and a constructor is used to define/initialize a class at instantiation.

These Java language elements serve specific functions and will likely be included in your program using strings and arrays. HOW you will use them depends on what you're program is supposed to do. Until you ask a more specific question we can't be much more helpful.

And a package (from your thread title) in Java is something else. I'm not entirely sure you meant to ask about packages, but you might look that up in the Java tutorials too.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!