Java Programming Tutorial – 16 – Many Methods and Instances

How to use multiple methods and also instance variables inside a class.


Comments

25 Responses to “Java Programming Tutorial – 16 – Many Methods and Instances”

  1. Honore16 on March 16th, 2010 9:54 pm

    Hi everyone, i have a question, for the code in line nine, is it possible to enter input.nextline() in the parameters instead of creating a string variable and then storing that variable?

    eg tunaObject.setName(input.nextline());

  2. spellingmastake on March 20th, 2010 1:06 pm

    For those having trouble with this video don’t worry. i think this is the first video in the series where he doesn’t explain things as well as he could.

    google more information on getters and setters and also return methods and then come back when you understand those.

    bucky i mean no offense your videos are awesome, it’s just this one confused me when i first saw it and seems to be confusing a few other people. Just wanted to let them know not to get disheartened.

  3. paramorechuchu on March 21st, 2010 10:04 am

    you have used two to programs; apples.java and tuna.java,, is it possible to make it in just one program???

  4. keeperkai999 on March 26th, 2010 1:32 am

    she was a babe hahaha

  5. jpnavi9 on March 29th, 2010 1:19 am

    actually tuna.java is a sub class of apples.java..
    which he showed brfore

  6. Manther2012 on March 30th, 2010 7:42 am

    “She was a babe!”

  7. debit256 on April 1st, 2010 9:24 am

    @paramorechuchu yes, and it would be easier. But he is just showing you how to use multiple methods from another class. which would be helpful if your writing huge programs and don’t want to confuse yourself with a shitload on just one page

  8. hugofmcm on April 4th, 2010 5:15 pm

    This one was kinda confusing :/

  9. adarshp1907 on April 5th, 2010 8:37 pm

    lol she WAS a babe

  10. Olterior on April 13th, 2010 7:12 pm

    Great tuts man , I’ve got a practical tomorrow this is saving my life !

  11. Molterno on April 15th, 2010 4:53 am

    Deffo gonna have to rewatch this 2 times x)

  12. CallMeMantou on April 15th, 2010 9:15 am

    what is the purpose of

    tuna tunaObject = new tuna();

    could somebody explain it in simple terms please?

  13. PremiumZero on April 18th, 2010 5:33 am

    thy did he do this
    public String getName(){
    return girlName;
    you dont realy need ya.

  14. PremiumZero on April 18th, 2010 5:35 am

    @PremiumZero *you dont need this

  15. littlecheff91 on April 20th, 2010 12:25 am

    Well I am still learning but I think the purpose of tuna tunaObject = new tuna(); is to create an object of the tuna class, which you later use to have access to the methods of the tuna class. Somebody please correct me if I am wrong, but I think this is what it does.

  16. unrewritable on April 20th, 2010 12:27 am

    Well I am still learning but I think the purpose of tuna tunaObject = new tuna(); is to create an object of the tuna class, which you later use to have access to the methods of the tuna class. Somebody please correct me if I am wrong, but I think this is what it does.

  17. berttadtad on April 21st, 2010 11:09 am

    hi, why do you need use class tuna when you can actually use:
    System.out.println(“Enter name of first gf here: “);
    String temp = input.nextLine();

    System.out.printf(“The name of your first gf was %s”, temp);

    immediately, please explain..

    thanks

  18. kashchicago on April 23rd, 2010 8:04 am

    @nocin1

  19. ezzab69 on April 23rd, 2010 8:07 pm

    @berttadtad Bucky’s just demonstrating the use of multiple classes, thats all.

  20. kapustelis on April 25th, 2010 9:44 am

    i think its a lot more simple if you write
    System.out.println(“Your first gf was ” + getName());
    it has same effect :)

  21. RUBENKNEX on April 25th, 2010 3:23 pm

    @kapustelis but then we wouldn’t learn about classes :p

  22. mathozero on April 27th, 2010 12:20 pm

    I hv trouble understanding the ” getName ” method… can somebody plx explain this to me?

  23. mouthbalz on April 27th, 2010 12:58 pm

    @mathozero getName – try to change this “get” any words it will work the same :)

  24. mathozero on April 28th, 2010 10:41 am

    @mouthbalz thx

  25. smiley1dsyahoocom on April 30th, 2010 9:42 am

    kool videos thanks alot

Powered by Yahoo! Answers