Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 8 of 8

Thread: Not getting the OOP thing!!!

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    5
    My Mood
    Worried
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Not getting the OOP thing!!!

    Hi Guys,

    As you can clearly see from my title I am not understanding the whole Object Oriented Programming "thing" more like MONSTER. I come from a procedural background and I think this is what is making it so difficult.

    When I look at/read java code I understand the code and know exactly what the programmer is trying to achieve. Where I get lost is how to plan your project and how to develop it on paper and when you need to create a new class and when not to. I understand that almost everything in Java is an Object and can see how and why but do not understand how to change my thinking to build java apps.

    If anyone knows of any good sites, articles or books that explains the concepts in laymans english I would appreciate it.

    Any help will be greatly appreciated.

    Thanks,

    Owen


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Not getting the OOP thing!!!

    I remember having a similar mental block when I first started learning Java, and I even remember the exact moment it "clicked", and I haven't thought the same since.

    Is there a particular concept or piece of code that's giving you trouble?

    And to be honest, I perhaps wouldn't worry about getting it perfectly right, especially at the beginning of learning a new language. The best thing you can do is write more code, and yeah the code will probably contain a lot of non-Java practices, but that's okay.

    As long as you don't abuse the static keyword, I think you should be okay. Most people who are new to Java use the static keyword as a way around thinking in Java, and getting into that habit is probably one of the worst things you can do from a basic programming perspective. That's just my opinion though, but that opinion is a result of dealing with that kind of code, usually written by C programmers who've been forced into Java at work.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    Apr 2013
    Posts
    5
    My Mood
    Worried
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Not getting the OOP thing!!!

    Thanks for the reply... Glad to know others have gone and are going through the same painful process. I am learning from SAMS teach yourself, head first java, java for dummies and trying the Lynda tutorial on Java. Like I said before, being a programmer, when I read Java code it seems to make sense however, when I want to start my own work I just cannot wrap my head around this language. Where do I start, what classes do I create? For practice I am trying to re-code some old projects I worked on in Java and I just cannot find where to start, a good workflow and what (haha, i nearly said procedurs) methods and classes I need to create.

    I prob need to be patient, I have only been looking at Java for a week now. Been going at it about 3 hours a day but still not getting it. I understand most of the concepts I just do not know how to apply these OO concepts to programming yet.

  4. #4

  5. #5
    Junior Member
    Join Date
    Apr 2013
    Posts
    5
    My Mood
    Worried
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Not getting the OOP thing!!!

    Just read Teach Yourself Programming in Ten Years and it is an interesting article. Although I believe the theory to be true I am sure that their findings do not include extreme talent. Not that I am saying that I am that talented... LOL... Good article though and a must read for anyone looking for the shortcut.

  6. #6
    Junior Member
    Join Date
    Apr 2013
    Posts
    5
    My Mood
    Worried
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Not getting the OOP thing!!!

    Also I did 1 of the exercises in SAMS 21 days and I coded it completely differently to what they did. They used the string.substring statement to extract the date and I used the Tokenizer to extract the string using the "/" as the character. Their source and mine gave the exact same result. Just proves how wonderful programming is...

  7. #7
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Not getting the OOP thing!!!

    Quote Originally Posted by AffiliateOwen View Post
    Also I did 1 of the exercises in SAMS 21 days and I coded it completely differently to what they did. They used the string.substring statement to extract the date and I used the Tokenizer to extract the string using the "/" as the character. Their source and mine gave the exact same result. Just proves how wonderful programming is...
    Exactly. There are many (infinite?) ways to approach any particular problem, so getting too caught up in getting it perfectly exactly right is a bit of a waste of time, in my opinion. Spend that time writing more code instead.

    Maybe the best thing to do would be to write some code and then post it somewhere (here?) for a critique and advice on how to be "more OOP". That'll be more concrete than any "best practices" we (or a book) could give you.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  8. #8
    Junior Member
    Join Date
    Apr 2013
    Posts
    5
    My Mood
    Worried
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Not getting the OOP thing!!!

    That is a great idea. Thanks Kevin I will definitely do that.

Similar Threads

  1. [SOLVED] Almost have my project done, just need help with one last thing.
    By ViewtifulAaron in forum What's Wrong With My Code?
    Replies: 8
    Last Post: March 31st, 2013, 09:44 AM
  2. This might be the easiest thing to solve.
    By tn12llmark in forum Object Oriented Programming
    Replies: 1
    Last Post: November 2nd, 2011, 07:49 AM
  3. need to figure how this thing will work
    By frosst in forum What's Wrong With My Code?
    Replies: 5
    Last Post: May 26th, 2011, 01:45 AM
  4. Weird thing with JFrame
    By Brt93yoda in forum AWT / Java Swing
    Replies: 2
    Last Post: August 23rd, 2010, 05:00 PM
  5. Trying 3 different ways to do the same thing, each one is wrong
    By shemer77 in forum What's Wrong With My Code?
    Replies: 14
    Last Post: June 4th, 2010, 07:01 PM