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

Java where to start

Options
  • 20-03-2008 1:31pm
    #1
    Registered Users Posts: 438 ✭✭


    hi guys,
    i was just look for some advice,
    i want to study java but i really dont know where to start and i m kind of self learning guy (not interested in java web development at this moment).
    any some one please through some light.


Comments

  • Moderators, Music Moderators Posts: 25,868 Mod ✭✭✭✭Doctor DooM


    Hi,

    Any knowledge of OOP? Or C++, in specific?


  • Registered Users Posts: 438 ✭✭wasim21k


    yes, i have bit experience in development and i studied c++ in DOS age, and i can understand coding most of the time. just need some starting point.
    SDooM wrote: »
    Hi,

    Any knowledge of OOP? Or C++, in specific?


  • Registered Users Posts: 2,481 ✭✭✭Fremen


    Grab yourself a copy of eclipse (A free development environment) and any old textbook on java development. You can probably find some decent lecture notes or tutorials on google, too.

    I think "Introduction to java" by Liang is the one I learned from.


  • Moderators, Music Moderators Posts: 25,868 Mod ✭✭✭✭Doctor DooM


    www.sun.com has some great online documentation too.


  • Moderators, Science, Health & Environment Moderators Posts: 10,079 Mod ✭✭✭✭marco_polo


    Hello world? :)

    thinking in java is an good book that is available now for free. Although it is a few years old the core of the language remains mainly the same.

    http://www.comment.it/bruceEckel/index.html


  • Advertisement
  • Registered Users Posts: 438 ✭✭wasim21k


    thank you guys,
    as i have no information about java like html is just html but i think about java its not just java and as i said i dont want to go for java web development but i m bit confused.
    http://www.eclipse.org/downloads/moreinfo/compare.php
    on this eclipse site.
    Java
    JEE
    C/C++
    RCP/Plugin
    Classic
    what exactly is the difference between them and which one i should go for? my aim is develop standalone applications and may be some network apps as well.


  • Moderators, Science, Health & Environment Moderators Posts: 10,079 Mod ✭✭✭✭marco_polo


    wasim21k wrote: »
    thank you guys,
    as i have no information about java like html is just html but i think about java its not just java and as i said i dont want to go for java web development but i m bit confused.
    http://www.eclipse.org/downloads/moreinfo/compare.php
    on this eclipse site.
    Java
    JEE
    C/C++
    RCP/Plugin
    Classic
    what exactly is the difference between them and which one i should go for? my aim is develop standalone applications and may be some network apps as well.

    The plain old java one or classic versions are what you want. J2EE version is for Enterprise Web / Application server development.


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    Bare in mind programming in JAVA involves a totally different mindset from structured programming using functions etc. You'll have to get comfortable with Objects, Inheritance, Polymorphism etc. Understand interfaces inside out.

    Best way to learn I think (in this order)

    - Simple Helloworld Class that prints to console
    - Simple Helloworld Class that uses Scanner(system.in) - to read text
    - Create a class and use it in a tester program
    - Create a List of Classes (Look at ArrayList<type> class)
    - Learn Inheritance (Extends) - Program to abstractions , ie don't have references to Concrete classes. (Polymorphism)
    - Interfaces
    - Events (Actionlisteners etc)
    - Move onto GUI stuff using Actionlisteners in your JButtons (Easy stuff really)
    - Start positioning those GUI objects (Look into the LayoutManager class and different layouts. Border layout for example (Useful)
    - Exceptions (Try / Catch / Finally blocks) - Understand what Exceptions you need to Check (Checked Exceptions)
    - Understand the Runnable Interface for the threading
    - Basic Threading - Start by getting two Runnable classes to run in separate threads that both operate on a 'Counter' object for example
    - Synchronized Methods/Locks (Reentrant Locks) - Notice that the scheduling of the threads is random so you may see weird stuff happening. (Need to provide locks etc)
    - Deadlock: One object works on a object that it locks so no other objects can run on it. Unfort, a condition is present so it cannot continue so you need to release the lock temporairly when you are waiting on something for another object to do. Look at Locks using the Conditions (Condition class) - (lock.await(), lock.signalAll() etc)
    - Generic Programming (ClassName<GenericType>) - like Templates in C++
    - Databases Connecting to MySQL DB or other DB. MySQL prob best to start with (using MySQL Driver)
    - Check up the serialization interface and see why you should implement it for the following topics
    - Get comfortable with the ObjectInputStream and ObjectOutputStream classes for following
    - Writing to Files (Plain Text / Binary / Objects (Serialization))
    - Sockets (Learn first to deal with text) , then start sending objects that are serialized
    - Start getting advanced and implement a server that is threaded - IE. It can receive multiple client requests. (This involves creating a new thread every time a client connects (rendezvous socket). The reference to the client socket is passed to the 'Runnable' implemented class that takes over.

    Once you've done all that, and you'd do it in a few weeks you should have a great foundation, join them altogether then by looking at Design Patterns or something such as the Observer Pattern etc. In no time you will be flying - Java is very easy to learn as once you get your head around working with Objects, then there is no weird syntax or anything. Other things you may look at might be enumerated types etc.

    I've used NetBeans for writing Java, but hear Eclipse is good.
    The Java API online is extremely helpful and very well laid out.


  • Registered Users Posts: 438 ✭✭wasim21k


    ooh man that is lots of help,
    thank you very much, really appriciat this,


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    No probs :) - best of luck with it.


  • Advertisement
  • Registered Users Posts: 2,192 ✭✭✭Dathai


    I will be doing Java next year in college I believe. I've got two books on Java at the moment, so I can teach myself the basics.

    Learning Java - O'reilly Publishing

    http://www.oreilly.com/catalog/learnjava3/

    Java How to Program - Deitel & Deitel

    Dont have a link to the Deitel & Deitel one, but both books are available in most good bookshops (Hodges Figgis, and possibly easons).

    The O'reilly book is excellent.It takes you from a novice programmer, with little or no knowledge of the language, and builds you up from there. The Deitel book is great for getting into quite technical areas of the language.

    Hope this helps!


  • Registered Users Posts: 5,370 ✭✭✭DublinDilbert


    i always find the "in easy steps books" (http://www.ineasysteps.com/books/details/?9781840783469) great to get started with any language...

    they are not the most comprehensive guide, but will get you started really quickly...

    http://www.ineasysteps.com/books/details/?9781840783469


Advertisement