Basic NetBeans Questions.

Discussion in 'Mac Programming' started by Chilz0r, Oct 18, 2007.

  1. Chilz0r macrumors regular

    Joined:
    Jul 20, 2007
    #1
    Hi All,

    I have a simple question. Each time I create a new project or new class in NetBeans it gives the following code (example):

    Code:
    public static void main(String args[]) {
    }
    I'm just wondering, why is that line there? isn't "args[]" an array & why would you want that at the beginning of a program? I'm also wondering if NetBeans is the best IDE to code Java in as I am a beginner to Java, I've done a fair bit of VB.net but I find NetBeans is a really weird IDE with vague error messages and strange compile errors or maybe thats just the Java language itself? A few of the errors I get when compiling are:

     
  2. Loc macrumors newbie

    Joined:
    Jul 23, 2007
    Location:
    Southern California
    #2
    The main() method is where you application starts. The args array is an array containing possible input from the console. For example, you might start your app in the terminal like this:

    java MyFirstJavaApp Hello World

    The args array will look like this

    args[0]="Hello"
    args[1]="World"

    I don't think using Netbeans or any IDE is a good idea when you first learn a language. I'd stick with something like TextMate or jEdit.
     
  3. toddburch macrumors 6502a

    Joined:
    Dec 4, 2006
    Location:
    Katy, Texas
    #3
    NetBeans is good. JCreator is good. Eclipse is VERY good, but there's a LOT to it.

    The price is right for all three of them. ;)

    Todd
     
  4. mishoro macrumors newbie

    Joined:
    Oct 19, 2007
    #4
    Packages help

    I need to know where extra packages like TerminalIO have to go so that you can use them in netbeans. Please help.
     

Share This Page