• Post Reply Bookmark Topic Watch Topic
  • New Topic

Want to learn Java  RSS feed

 
Priya Sinh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please advise on where to start and how to start as I want to learn Java programming from scratch, and have least programming experience. There are many resources on internet and its so easy to get distracted, so I really need some advise to focus on and slowly master this language and be a good programmer. I am ready to work hard along with my job and busy life. Appreciate any help and guidance.
Thanks!
 
Liutauras Vilda
Marshal
Posts: 3961
214
BSD
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

You can start with Oracle Java Tutorial (<-- link). There are basics as well as more advanced topics covered.
Also, spend as much time as you can on Beginning Java forum in CodeRanch (exactly where you are now), so you'll have an ability to see most common exercises, possible approaches to solve them.
As well as multiple tips how to avoid usual mistakes.

Best luck in your Java journey
 
Stevens Miller
Bartender
Posts: 1444
30
C++ Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And don't hesitate to ask us for help!
 
Campbell Ritchie
Sheriff
Posts: 54078
130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome again

How much programming experience have you already? Would you like to buy some books?
 
Priya Sinh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Liutauras for the advise on where to start. I think I'll focus on the tutorial topics and proceed from there.
Thank you, Stevens and Campbell for the welcome note. And I won't hesitate to ask.

I have ~2 years of programming experience and then started working on Databases and slowly moved to nowhere near to programming. Old enough to start a fresh career but young enough to take challenge to learn towards expertise. Java has always been intriguing to since start of my IT career, and I lacked focus so far to look at it. Now that I really want to learn, along with my job and life I am doing my best to learn and to sharpen my brain cells for programming.
I would gladly refer to books and wouldn't hesitate buying, but I don't want to dwell in many books and proceed no where, as easily lose focus at times. I am thinking of a focused approach until I am at level where i can glance through books to find what I want to dig into. Sorry, if I am sounding stupid. Is there any specific book I should read through along with Tutorials mentioned by Liutauras?

Advises from you all is something I would take seriously, and I am seeing all of you as my mentor to my journey a good Java programmer!
 
Campbell Ritchie
Sheriff
Posts: 54078
130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this book
if you have some experience already.
 
Priya Sinh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ritchie!
I'll try getting a copy to go through.
 
Liutauras Vilda
Marshal
Posts: 3961
214
BSD
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another idea, think of personal project to start. You mentioned you have experience with databases. Think of creating simple ATM machine simulator, so your database could be an actual bank money treasury where all cash $ are stored.

So your task could be to create ATM machine terminal, so the user by placing card in would be asked to enter its PIN number (PIN number validation, after 3 attempts user gets kicked out for a while). After enter correct PIN number user could see some standard operation options: check balance; withdraw money; top-up money; change pin.

Go to actual ATM machine, research what options your local machine offers, try to mimic the same in your project.

There are quite wide opportunities with such project, later you could think of graphical user interface, but that is for later.

Just an idea, you can pick any other project you may like. Maybe your favourite game, maybe weather app...
 
Priya Sinh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Liutauras, for the idea of grabbing a project for learning.
I am actually thinking of making a scheduler to run different jobs for different time zone being on one machine/server. Seems like ambitious at the moment, but am sure its doable. Any advise on what learning factors to consider to proceed with?
 
Liutauras Vilda
Marshal
Posts: 3961
214
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably you won't escape Object Oriented Programming techniques, in fact - you shouldn't. Java is an Object Oriented programming language, so you'll need to use those techniques in your project too. In the tutorial I gave you earlier, you can find a whole chapter about it.

What else is needed:
  • You need to define exactly what is your project about
  • Describe it in plain text
  • Identify possible classes, methods
  • Draw diagram (check UML)
  • Write a pseudo code of the program flow in very abstract steps
  • Rewrite in more details, again in more until you have everything in details

  • You're absolutely right that it is quite challenging, but it is interesting. Let's wait for someone else to give you some other insight from different perspective.

    And maybe this tutorial (<- link) written by one of moderators will be helpful at some point too.
     
    Priya Sinh
    Greenhorn
    Posts: 6
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    No, I won't escape Object Oriented Programming techniques, and so will stick to Java. I am slowly going through the tutorial you directed me to, and right at the OOP concept chapter.
    Have saved the pointers for the project, and will keep defining it as I slowly learn Java

    The other link to the 'Where Do I Start' topic been quite instructive, and I think I'll have to read through it again to not forget all the advises there.
    Its been a week that I decided to learn, and haven't been progressed much. Hoping I get through each topic and call myself a Java programmer some day. . Seems hard so far!!
     
    Knute Snortum
    Sheriff
    Posts: 3615
    87
    Chrome Eclipse IDE Java Postgres Database VI Editor
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Seems hard so far!!

    That's because it is! But keep at it and you will reap the benefits.
     
    Winston Gutkowski
    Bartender
    Posts: 10573
    65
    Eclipse IDE Hibernate Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Priya Sinh wrote:The other link to the 'Where Do I Start' topic been quite instructive...

    Glad to hear it.

    Its been a week that I decided to learn, and haven't been progressed much. Hoping I get through each topic and call myself a Java programmer some day. . Seems hard so far!!

    And it'll only get harder; so I hope you're ready for the challenge.

    You said that you have "~2" years of programming experience, but didn't say what in. If it was a procedural language, you might find this page worth reading, since I also came to Java from a "procedural" background.

    One thing in your favour: if you remember some of your database theory, it will serve you well with Java - particularly in understanding "collections" and where and when you use them; but also in understanding how to normalize data properly.

    Good luck.

    Winston
     
    Jamie Jay
    Greenhorn
    Posts: 4
    1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I'm excited learning Java EE by use a code generator. You can generate some sample application and play around with different generator settings and the generated code. So if you do not want to learn just learn Java SE, but Java EE, check some nice generators like generjee or JBoss Forge. Unfortunatelly, there are only few tools generating Jave SE code. But most real life projects are based on Java EE. Java EE is relativ lean an easy to learn these days. So take some minutes to try a Java EE code generator and check yourself if this may be a way to learn Java.
     
    Campbell Ritchie
    Sheriff
    Posts: 54078
    130
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Welcome to the Ranch
    Please show us some of the code. I have seen code from some generator tools and have not thought it any good for teaching. Maybe your tool is different.
     
    Jamie Jay
    Greenhorn
    Posts: 4
    1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Yes, my tools are definitely different You are absolutely right, if you used some of this tool which produce very extensive code like Spring Roo, springfuse or appfuse.
    This is why I pointed to Forge and generjee, which both generate lean and clear CRUD code that is rather easy to understand and learn. Forge is the tool with more options and supported technologies. Generjee is simple to use because it is full-online.
    When we let students or trainees start learning this way, we always get outstanding learning curves and they have fun because of immediately visible results.
     
    Liutauras Vilda
    Marshal
    Posts: 3961
    214
    BSD
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Jamie Jay wrote:When we let students or trainees start learning this way, we always get outstanding learning curves and they have fun because of immediately visible results.
    You mean you showing them how to run without letting them to step their first steps first?

    Teaching Java EE technologies guys who
    Priya Sinh wrote:want to learn Java programming from scratch, and have least programming experience
    doesn't look right to me. We usually solving with students here the way simpler exercises, yes, quite often we struggle, but that is expected, it is Beginning Java forum and we don't rush with the things which could over complicate everything. Usually most of moderators suggests even not to use any clever IDE's which have also some auto code generation for methods as toString(), hashCode(), equals()...

    Please explain a bit more about those teaching techniques, how such generated codes could be helpful for the newcomers without any prior programming experience?
     
    Priya Sinh
    Greenhorn
    Posts: 6
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks Winston, and I already have understood the challenge and just by imagining how much to learn makes me shudder with doubts. Its hard but if others can, I can too (I think so). Just trying to be focused for many years to come on my own, since my job is much different to what I am trying to learn. And I can rate myself average student, so real long way to go. (sigh!)
    My background in programming is a total mess, to be honest. And that's the motivation to learn the basics and learn one programming language first. I went through your Eureka moment page, and to understand it fully in and out, I'll revisit again after getting basics clear.

    Thanks Liutauras, for keeping my idea of learning intact - as I felt awful when I didn't understand anything what Jamie said. EE is far from my reach when I am at first couple chapters of SE. Hoping I learn the core of Java and try hands on coding.
    I am following the tutorial advised by you step to step. Please be kind to mentor me on this long ride!

    Thanks all, again!
    With hopes and efforts of doing good at Java. ~PS
     
    Jamie Jay
    Greenhorn
    Posts: 4
    1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    @Priya: Great that you found the resourcen that help you!

    @Liutauras: What I mean, is "learning by playing". Of course, it needs some courage and freedom. But indeed, in our experience it works much better than starting with System.out.println("Hello World!"). This is how we do it:
  • Let the learner design at least one simple Entity with some fields on the paper.
  • Let she/him input the model into a code generation tool.
  • Run the generated application, discover the code, extend the model, try individual code changes...

  • It sounds not as straightforward as convential learning. But it stimulates curiosity and joy of discovering. This overweighs the didactical incorrectness of this approach. It really works!
    The generated code of a CRUD application with one entity has about 400 lines of real Java code and 300 lines of JSF. This is an optimal amount to play with it and learning a lot of new things simultaneous. After a certain time, trainees are wholesome Java EE developers, while other just learned plain Java SE.
    The most important thing is to believe in it and to create ambient conditions of courage, curiosity and some freedom. Even people new to programming learn very fast. And in a few cases, if this approach does not work, it is not too late to switch back to "Hello World" after one day.

    Not to forget: Of course the trainee needs some support by available experts and theoretical backing.
     
    Liutauras Vilda
    Marshal
    Posts: 3961
    214
    BSD
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Jamie Jay wrote:This is how we do it...
    Thank you for explaining us in details. Ah, have a cow for that
     
    Danny Alphones
    Ranch Hand
    Posts: 50
    1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    you should go to Stanford university because they give free lectures for both beginners   and intermediate people in java.

    P.S
    it taught me more about java in one week then months in any other java learning sours(s).  
     
    Jeremiah Parrack
    Greenhorn
    Posts: 25
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    For starters I recommend thenewboston.com 
     
    Liutauras Vilda
    Marshal
    Posts: 3961
    214
    BSD
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Jeremiah Parrack wrote:For starters I recommend thenewboston.com 
    I'd avoid that site. They teach all sort of wrong things.
    1. Starting from a suggestion to use class names with first lower case.
    2. Bad formatting.
    3. Poor variable names as 'double tuna = 5.28' - have no idea what that tuna of type double might be.
    4. Multiple variables declaration on one line.

    There are more on the list.
     
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!