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 2 of 2

Thread: OOP tutorials (I made)

  1. #1
    Junior Member
    Join Date
    Nov 2018
    Posts
    28
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default OOP tutorials (I made)

    https://pastebin.com/GWGs0phe

    Hi guys,

    The following is a silly program I made.

    https://pastebin.com/GWGs0phe

    It covers:

    1) Methods

    2) Passing parameters to and from methods

    3) Constructors

    4) Instantiating new objects

    5) Dot notation

    6)Printing objects

    7) Instance variables

    Hope it helps



    *NB: I know that I have probably done somethings in a less than optimal way, like not using static for example, but I've just made that program using the stuff I've learned so far.


    If you want to see a working OOP program in motion, then:

    https://ufile.io/fhtpa

    That covers:

    persistence
    arrays
    OOP
    accessor modifiers
    get/set methods
    validation
    Methods
    Parameter passing

    I/O
    And other stuff I can't remember exactly off the top of my head

  2. #2
    Member
    Join Date
    Sep 2018
    Location
    Virginia
    Posts
    284
    My Mood
    Cool
    Thanks
    0
    Thanked 38 Times in 36 Posts

    Default Re: OOP tutorials (I made)

    *NB: I know that I have probably done somethings in a less than optimal way, like not using static for example, but I've just made that program using the stuff I've learned so far.
    It is not necessarily true that static makes the code significantly more optimal. But regardless, that is not a good reason to use static anyway. My general guideline is to use it for shared utility classes (like the Math class) and other classes which require a method to serve a functional purpose and does not require direct access to any instance fields other than via the argument list.

    Regards,
    Jim

Similar Threads

  1. [SOLVED] Could I have made this simpiler?
    By lil_misfitss in forum Java Theory & Questions
    Replies: 3
    Last Post: June 21st, 2014, 02:05 PM
  2. Replies: 1
    Last Post: August 5th, 2013, 02:49 PM
  3. Fun little problem I made for myself, and now I need help trying to solve it.
    By 0ffConstantly in forum Loops & Control Statements
    Replies: 2
    Last Post: October 19th, 2012, 12:33 PM
  4. changes made to JSP or servlets
    By the light in forum JavaServer Pages: JSP & JSTL
    Replies: 2
    Last Post: May 30th, 2011, 08:19 AM