Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Is Java hard to learn?

Options
2

Comments

  • Registered Users Posts: 696 ✭✭✭Magown3


    Guys, stop telling him to run off and download Eclipse or any other IDE. The man wants to learn the language, and the best way he is going to do that is not by having a program hold his hand along the way. Using a simple tect editor and a command line installer will teach him far more in the first few weeks than any IDE will allow.


    Very true.... I was about to suggest NetBeans but thought the better of it.


    Make sure you install the J2SE 5.0 before you install TextPad. That way your compile and run options will install automatically, but this isn't absolutely necessary. You can still add in the extra compile and run commands through the options.


  • Closed Accounts Posts: 2,046 ✭✭✭democrates


    class HelloWorldApp {
        public static void main(String[] args) {
            System.out.println("Hello World!"); //Display the string.
        }
    }
    
    This typical first program (freshly stolen from the sun) prints "Hello World!" to the command line.
    Mad isn't it Ted!

    But don't fret, most of it is stuff you'd copy and paste to any little program you write, it just sets up a place for your code in the java object-oriented environment,
    System.out.println("Hello World!");
    is the line that does your bidding.

    You could change the class name from HelloWorldApp to py2006RulesOk or whatever, change Hello World! to Baste my steaming pudding, and delete or change "//Display the string." which is a comment to remind you what your code does when you come back to it in 3 months.
    http://java.sun.com/docs/books/tutorial/getStarted/application/index.html describes the program above in a basic way.

    You can start learning more java syntax and write lots of pleasing programs just by adding to the above code using the sun java tutorials and your new book.

    Eventually to unleash the real power of java you'll need to get to grips with how to design object oriented applications. This can be a headwrecker but when it comes together you'll find you are able to avoid re-inventing the wheel by re-using code.

    Java doesn't just let you run a program you write, it comes with libraries of code you can call from within your program that do powerful things, Alladins code cave! The beauty is you don't have to know how they work, just how to use them, a bit like you can drive a car without knowing how the engine works.

    Good luck and enjoy!


  • Registered Users Posts: 877 ✭✭✭clearz


    If you are gonna be doing java in September probably for 4 years my advice to you would be to start learning C++ now. Just some basic console apps will be fine but learn to do them using object oriented methods. Then when you start doing java you will be tought all the stuff again but in a different but similar language so it will be alot easier and you'll also know some c++ if you ever go back to using it later on.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Guys, stop telling him to run off and download Eclipse or any other IDE. The man wants to learn the language, and the best way he is going to do that is not by having a program hold his hand along the way. Using a simple text editor and a command line compiler will teach him far more in the first few weeks than any IDE will allow.

    Thats a very good point. Eclipse is the win, but notepad is best starting off. Once you start using eclipse you will find it will start cleaning up your code for you (if you let it), it is better you get into those habits before an IDE takes over or your left with bad habits.

    As for the HelloWorld program. The most common gotcha is having this not being able to run from the command line. :) So don't fret if you can't get it running first time, nearly everyone fails that first time. Its better you learn why yourself.


  • Registered Users Posts: 9,847 ✭✭✭py2006


    Thanks alot for the info guys! The whole thing sounds like double-dutch at the mo!

    However, I did do a very brief intro to Visual Basic on a FAS course bout 7-8 years ago. Which I guess is a bit different but it seems along the same lines!


  • Advertisement
  • Registered Users Posts: 1,562 ✭✭✭kyote00


    >> "Guys, stop telling him to run off and download Eclipse or any other IDE. The man wants to learn the language, and the best way he is going to do that is not by having a program hold his hand along the way. Using a simple text editor and a command line compiler will teach him far more in the first few weeks than any IDE will allow."

    This is just rubbish, when you are starting out you need all the help you can get. Perhaps you should have him using vi, or put his feet in cold water so he a little more uncomfortable.

    Using textpad or the like will not make you a better programmer. You will spend more of your time trying to make the code look nice (indents,tabs etc) and less time understanding the main constructs. How long would it take to explain CLASSPATH for a newbie

    Eclipse takes away the mundane formatting/typing of a program and setting up of the environment and lets you focus on the program you are trying to write, or the language you are trying to learn.
    Note if you ever want to learn a new language (say C++) then you can also use Eclipse so the effort is reusable .

    textpad :(
    eclipse :)


  • Registered Users Posts: 11,262 ✭✭✭✭jester77


    It's probably a little daunting starting out.

    A good place to start is Sun's (creator's of Java) Java Tutorial.
    http://java.sun.com/docs/books/tutorial/index.html

    Use notepad at the start for writing your Java code, otherwise an IDE (Integrated Development Environment) will be doing alot of the work in the background for you and you won't understand what is happening. Once you understand how everything is working then use an IDE. NetBeans and Eclipse are probably the 2 most popular free IDE's at the moment. The last 2 companies I've worked for use Eclipse, that would be my favourite but try them all out.

    Download the J2SE 5.0 and install it. That's all you need to get going. The tutorial will explain all of this for you with links to what you need and will help you on your way.

    There is plenty of good info and sites on the web, no need to pay for a course or purchase books. Once you get through the tutorial have a read of Thinking in Java, 3rd Edition by Bruce Eckel. You can download it here:
    http://www.mindview.net/Books/TIJ/

    Here are a few good Java resources but I would stick with the tutorial to begin with:
    http://wdvl.com/Authoring/Java/
    http://www.javalobby.org/
    http://www.javaranch.com/
    http://javaboutique.internet.com/
    http://www.javaworld.com/
    http://java.oreilly.com/


  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    kyote00 wrote:
    Note if you ever want to learn a new language (say C++) then you can also use Eclipse so the effort is reusable.
    When I was in first year in college, our lecturer informed us that JBuilder (what we'd been using in college) was free on the cover a PC mag that month. So we all promptly went out and got it and used nothing but JBuilder for Java. It was great, you just write the code, hit "Run" and everything works. Two years later, we were all struggling to submit projects because we hadn't a clue how to use the command-line compiler.

    Now, we were sufficiently savvy to figure it out (though a couple of people never managed to), but I do think it makes more sense to start at the bottom. A "Run" button on a program isn't helping you learn, unless you already know what the run button is doing for you.

    Incidentally, the year that came behind us were forced to use textpad to write their Java.


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    We used plain notepad and the command prompt. When I started doing GUI stuff, I did it all manually through notepad before I ever went near and IDE. This gave me a great insight into what an IDE is actually doing behind the scenes, and I can't count the number of times that's been very usefull to me.


  • Registered Users Posts: 9,847 ✭✭✭py2006


    seamus wrote:
    When I was in first year in college, our lecturer informed us that JBuilder (what we'd been using in college) was free on the cover a PC mag that month. So we all promptly went out and got it and used nothing but JBuilder for Java. It was great, you just write the code, hit "Run" and everything works. Two years later, we were all struggling to submit projects because we hadn't a clue how to use the command-line compiler.

    Now, we were sufficiently savvy to figure it out (though a couple of people never managed to), but I do think it makes more sense to start at the bottom. A "Run" button on a program isn't helping you learn, unless you already know what the run button is doing for you.

    Incidentally, the year that came behind us were forced to use textpad to write their Java.

    Jaysus, thats mad! Where did you go to college?


  • Advertisement
  • Registered Users Posts: 9,847 ✭✭✭py2006


    jester77 wrote:
    It's probably a little daunting starting out.

    A good place to start is Sun's (creator's of Java) Java Tutorial.
    http://java.sun.com/docs/books/tutorial/index.html

    Use notepad at the start for writing your Java code, otherwise an IDE (Integrated Development Environment) will be doing alot of the work in the background for you and you won't understand what is happening. Once you understand how everything is working then use an IDE. NetBeans and Eclipse are probably the 2 most popular free IDE's at the moment. The last 2 companies I've worked for use Eclipse, that would be my favourite but try them all out.

    Download the J2SE 5.0 and install it. That's all you need to get going. The tutorial will explain all of this for you with links to what you need and will help you on your way.

    There is plenty of good info and sites on the web, no need to pay for a course or purchase books. Once you get through the tutorial have a read of Thinking in Java, 3rd Edition by Bruce Eckel. You can download it here:
    http://www.mindview.net/Books/TIJ/

    Here are a few good Java resources but I would stick with the tutorial to begin with:
    http://wdvl.com/Authoring/Java/
    http://www.javalobby.org/
    http://www.javaranch.com/
    http://javaboutique.internet.com/
    http://www.javaworld.com/
    http://java.oreilly.com/

    Wow, thanks for all that! I will have no excuses now!


  • Registered Users Posts: 1,562 ✭✭✭kyote00


    forced to use 'textpad' :eek:

    OK. I was just worried that we were creating hurdles for the OP (who I'm sure is by now an expert) to overcome --- when what he wants to do is learn java.

    Most companies now will already have an IDE in use. They will also have coding guidelines/standards to ensure that the basic layout and syntax is similiar. They will not be using a command line compiler, this will be wrapped in a build environment, probably linked with the config mgt/source code control system. Most people I know use Ant as the builder for Java for personal projects. You still need to know the command line options (i.e what things are and how they work) (just as you need to know classpath,jar files etc with Eclipse) but it makes the management/changing of these items much easier.

    PS what does the 'Run' button do in eclipse ?

    BTW: How do all you textpad users debug your Java programs ?


  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    py2006 wrote:
    Jaysus, thats mad! Where did you go to college?
    UCD. It wasn't actually textpad, but it was a similar text-only application.


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    kyote00 wrote:
    BTW: How do all you textpad users debug your Java programs ?
    I used the good old fashioned system.out.println(); debugger :) , handled everything I ever needed. While I have been very impressed with the Visual Studio debugger, it's still handy to have experience of debugging code the long way, I generally know exactly where any problems I have are before I start to debug.


  • Registered Users Posts: 1,562 ✭✭✭kyote00


    "I used the good old fashioned system.out.println(); debugger , "


    The defense rests....:p


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    kyote00 wrote:
    The defense rests....:p
    kyote00 wrote:
    Using textpad or the like will not make you a better programmer.
    Yes, it will.
    kyote00 wrote:
    You will spend more of your time trying to make the code look nice (indents,tabs etc) and less time understanding the main constructs.
    Only if you allow yourself to get bogged down in that.
    kyote00 wrote:
    Eclipse takes away the mundane formatting/typing of a program and setting up of the environment and lets you focus on the program you are trying to write, or the language you are trying to learn.
    Eclipse introduces another environment for him to have to learn, one that is only one of many possible ones. Its better for him to come to terms with the language first, and then when he is comfortable with that, start learning an environment to apply it in in a manner that allows him to be productive.

    Having to learn Eclipse, or Netbeans, or JBuilder along with Java will only bog him down in the specifics of the environment more than the specifics of Java.

    Nobody is telling him to use a simple editor for the rest of his life, ffs, just for the first few weeks while he is starting out. Do you honstly think he will learn the symantecs of a language better with something cleaning up around him as he goes?
    kyote00 wrote:
    Most companies now will already have an IDE in use. They will also have coding guidelines/standards to ensure that the basic layout and syntax is similiar. They will not be using a command line compiler, this will be wrapped in a build environment, probably linked with the config mgt/source code control system. Most people I know use Ant as the builder for Java for personal projects.
    Most companies also like people with a few years experience under their belts.
    kyote00 wrote:
    You still need to know the command line options (i.e what things are and how they work) (just as you need to know classpath,jar files etc with Eclipse) but it makes the management/changing of these items much easier.
    And exclusively using the command line compiler is the best way to learn what these are, how they are best used, what situations to use them in, etc. He can go on and figure out the rest afterwards.

    Right now, he wants to learn Java, and nothing more. Not how to wrestle with Eclipse, not how to write an Ant script. Learn the language, not one of many environments.

    Your witness.


  • Registered Users Posts: 1,562 ✭✭✭kyote00


    I know I shouldnt but there so much bad advice given, I cant help myself......

    1) textpad issue.
    Explain to me how textpad will use make him a better programmers ?

    2) Eclipse introduces another environment........
    We are trying to have him focus on learning the language. Eclipse removes one of the biggest headaches newbies have such as setting the classpath,
    helping with solutions to common compiler errors, and helping understand how the program executes using the debugger. Imagine been able to run your program line by line, check whats variables are set and are not...
    Colour coded editor so that you can see whats a reserved word, whats a variable. Tabbed windows so that you dont have the 'window blitz' problem if browsing several files.

    3) And exclusively using the command line compiler is the best way to learn what these are
    The command line is likely to be: $ javac foo.java ---- awesome learning there.

    4) Learn the language, not one of many environments.
    You appear to have missed the point of Eclipse. It hides the environment and focuses on the application under development -- that one of the main tenets of the eclipse project. You can also move projects to Mac or Linux


  • Registered Users Posts: 9,847 ✭✭✭py2006


    kyote00 wrote:
    I know I shouldnt but there so much bad advice given, I cant help myself......

    1) textpad issue.
    Explain to me how textpad will use make him a better programmers ?

    2) Eclipse introduces another environment........
    We are trying to have him focus on learning the language. Eclipse removes one of the biggest headaches newbies have:

    What exactly is eclipse?


  • Registered Users Posts: 1,562 ✭✭✭kyote00


    Its an integrated development environment that will enable you to work on learning Java and not have to struggle with command line options for the compiler, classpath settings. (IMHO)

    Eclipse sorts your work into projects, each project has an editor that will allow you to see your code in a language aware window (colour coded and hints).

    You can step through the execution of your program line by line, stop it at a given point and see what it happening.

    You will need to invest some time upfront to learn about the project structure it uses --- this normally take not longer than a 1/2 day and will set you for a much more productive attempt to learn Java


  • Advertisement
  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    kyote00 wrote:
    Eclipse removes one of the biggest headaches newbies have such as setting the classpath,
    A seconds work. It might take a bit of getting used to having to remember to do it
    kyote00 wrote:
    Colour coded editor so that you can see whats a reserved word, whats a variable. Tabbed windows so that you dont have the 'window blitz' problem if browsing several files.
    There are advanced text editors that will do all that for you, and they even do indenting too...
    kyote00 wrote:
    helping with solutions to common compiler errors, and helping understand how the program executes using the debugger.
    Read the stacktraces, and documentation. Use Google if you're still stuck.
    kyote00 wrote:
    We are trying to have him focus on learning the language.
    kyote00 wrote:
    You appear to have missed the point of Eclipse. It hides the environment and focuses on the application under development -- that one of the main tenets of the eclipse project.
    Make up your mind.
    kyote00 wrote:
    It hides the environment and focuses on the application under development
    But he doesn't want to write applications, does he? He wants to learn Java.

    I know what Eclipse is for, I know what its like, I know the advantages, and the disadvantages. I work with it, and have with several other IDEs in the past, and I can tell you that an IDE is not the place for a beginner programmer. Hell, any half decent programmer should be able to work perfectly well without an IDE.
    kyote00 wrote:
    You can also move projects to Mac or Linux
    You're thinking way, way too far ahead here. Come back a little...
    py206 wrote:
    What exactly is eclipse?
    Eclipse is a program that is used to write Java applications in. It has a lot of features that allow programmers to work effeciently, but a program like this isn't the best starting point for a beginner.

    Really nothing you need to worry about at the moment.


  • Registered Users Posts: 9,847 ✭✭✭py2006


    Thanks! I guess alot of this will make alot more sense when I actually sit in front of it and start learning.


  • Registered Users Posts: 1,562 ✭✭✭kyote00


    I think I will leave the last word with py2006 as I suspect the arguments above are not really helping him.

    py2006: Good luck with your Java learning

    a_w: Don't spend to long in textpad and on the command line, it will wreck you head eventually.

    For me, I will stick with eclipse


  • Registered Users Posts: 9,847 ✭✭✭py2006


    Not even sure if I will do it at all now! You have all scared the bejesus out of me!

    I am strongly considering a degree in Computing in Blanchardstown which should cover Java.

    I might try and get the basics into my thick skull before hand though.


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    kyote00 wrote:

    BTW: How do all you textpad users debug your Java programs ?

    Er, jdb (part of the Sun SDK)? Have you used a text interface debugger? You really should give it a try; I find them easier than the GUI ones to use...

    Our college (TCD) never attempted to force editors or IDEs on us, fortunately. For smallish java things, I tend to use EMACS, for larger ones, Eclipse.
    kyote00 wrote:
    Imagine been able to run your program line by line, check whats variables are set and are not...
    Colour coded editor so that you can see whats a reserved word, whats a variable. Tabbed windows so that you dont have the 'window blitz' problem if browsing several files.

    The person learning should be setting classpaths and so on themselves. It'll help them see what they're actually doing.

    Any decent text editor has syntax highlighting, auto-indent, and probably autocomplete.

    And, again, are you aware of the existence of command-line debuggers?
    kyote00 wrote:
    You can also move projects to Mac or Linux

    What has Eclipse got to do with that?

    And to the OP, don't be scared by all of this. Java is easy. You may want to take a look at http://java.sun.com/docs/books/tutorial/; it's free and quite good.


  • Registered Users Posts: 1,562 ✭✭✭kyote00


    definately dont be scared to try. Its the only way to learn. Once you start, you will find it moved along easily (either with command lines or eclipse) ---- but DO START.

    And definately dont be put off doing something by advice elicited on a online board....

    For the real inside deal, Go talk to the CS dept at Blanch and see what they have to say (ask them if the use Eclipse ;) ), not sure if you are working, perhaps your company will financially support you too.

    One thing I personally have found is that its a lot easier to learn when you are in a class of like or similar minded people and not ploughing a furrow on your own.

    As you will find with Java, there are many ways to accomplish the same thing, the 'advice' so far in this thread is that there are two ways to learn:
    - one using the mimumim set of tools to allow you to focus on the language
    - one using a development enviroment to do the same

    Now you have choices, thats good !


  • Registered Users Posts: 597 ✭✭✭bambam


    If you want to learn java using an IDE, there is a lot of talk about BlueJ. It's a IDE specifically designed to aid people learning Java.

    http://www.bluej.org/


  • Registered Users Posts: 1,562 ✭✭✭kyote00


    some free Java books here.

    http://teaching.gent.ie/bruceeckel/


  • Registered Users Posts: 9,847 ✭✭✭py2006


    kyote00 wrote:
    some free Java books here.

    http://teaching.gent.ie/bruceeckel/

    Thanks for that, they look kinda out of date though?


  • Advertisement
  • Closed Accounts Posts: 146 ✭✭MrScruff


    O Reilly books are your best bet IMHO.

    http://www.unix.org.ua/orelly/java-ent/


Advertisement