Java Programming Tutorial – 16 – Many Methods and Instances

Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –






48 responses to “Java Programming Tutorial – 16 – Many Methods and Instances”

  1. Baphomet Mojo Avatar

    my first and only gf was null ๐Ÿ™

  2. Justin S Avatar

    For anyone getting errors like "input was never closed" or "input was never resolved", just make a new line directly underneath and write:


    Java has changed a bit since these videos were uploaded ๐Ÿ™‚

  3. Samir Maliqi Avatar

    in this method we are going to import a "SHTRING" hahahahah :p

  4. itsArtem Avatar

    help girlfriend.jar not found.

  5. Donald.V Thomas Avatar

    I understand most of it but he didn't explain the purpose of the getName variable. Correct me if I'm wrong but is the purpose to give access to the data he made private to the apples class…. basically he made it private just to undo it right under?

  6. Emmet Casey Avatar

    Anyone that is stuck, this is how you will understand.

    If you go to a channel called Sebastian League and go to his 'Unity and c#' and go to his method one, in it it tells you about this.
    (Even though it's a different language and game engine it still works)

  7. Eric Honesty Avatar

    am i supposed to know whats going on here?

  8. Prime Master Avatar

    Can't we just do this instead:

    private String girlName;

    public String Name(String name) {
    girlName = name;
    return girlName;

    public void Message() {
    System.out.printf("Your first gf was %s", Name(girlName));

  9. Captainblueblob Avatar

    He never really explained what the return girlName meant.

  10. Pradyot Prakash Avatar

    is it compulsory to use public string getname() method..??

  11. Huzefa Poonawala Avatar

    hey is it important to use private in tuna???

  12. Shubham Saha Avatar

    Any Kelsey over here?

  13. Ayman 914 Avatar

    Why make a private variable in the first place?

  14. Saurav Pun Avatar

    when i tried the same it says, 'string cannot be resolved to a type'

  15. dopier12 Avatar

    You had to say that @ 5:53, didn't you? Man it's amazing to have such a complete package free of charge! I'll be proud when I make my first donation, although I'm well aware that subscribing did add to your statistics.

  16. Guy Zwerdling Avatar

    Hi Buckly
    :the last method doesn't work for me
    System.out.printf("Your first gf was %s", getName());
    I get the error
    The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, String)

    Please help

  17. happinessisafulltank Avatar

    Shoutout to Kelsey for being a babe.

  18. Nitin singh Kachwaha Avatar

    Hey bucky my printf function is not working its kind of showing that it is not attached to source or Javadoc error !!! Plss help me out

  19. Shikhar Srivastava Avatar

    if we don't use public String getName(){ return girlName;}
    what will happen , i don't think so any thing will happen! their is no use of this in this program you'vd made! Is it ?

  20. Nvs Abhishek Avatar

    what is the default status of variables without using any keyword… private or public?

  21. ะ•ัั ัั†ั Avatar

    thanks bucky, i understood it, i played around with it and i created many examples but it takes time to master i replayed the video many times.
    15 tutorials yesterday and only this tutorial today :O

  22. Kazimierz Garshin Avatar

    I lose you because of the many variable names. Where does the value from the variable "temp" gets passed into he variable "name"?

  23. Sa3d Clay Avatar

    System.out.printf(arg0, arg1);
    When i write "getName" in "arg1" it give me error
    Can anyone help me !

  24. Muhammad Taymoor Avatar

    I have a problem above in "Saying". Please help me to find my gf ๐Ÿ™‚
    Somebody help

  25. Gotostep2 Avatar

    I've discovered that C is much more similar to Java, like comparing a colon to a semicolon. Where as C++ is more like an exclamation point.

  26. Fadl Tito Avatar

    what is getname ?

  27. DEAD Surname Eat Avatar

    printf not working :O

  28. Pizza Guy Avatar

    Simplified Code:
    package ahmed;
    import java.util.*;
    public class Apples {
    public static void main(String []args){
    Guava objGuava = new Guava();

    Scanner ainput = new Scanner(;
    System.out.println("Enter friend name :");

    String binput = ainput.nextLine();

    package ahmed;

    public class Guava {
    private String xName;
    public void sandName(String name)
    xName = name;
    System.out.println("MY friend name is " + xName);


    Any question?
    Leave them in a reply

  29. Thomas Avatar

    I had an issue here where I had to change the compiler compliance level to 1.5+ or it wouldn't return the name. Project > Properties > Java Compiler.

  30. Carlos Padilla Avatar

    it gets confusing at times, but I like it!!

  31. Klson Bob Avatar

    How to use the "return", what is it for?


    hey but when I'm using this System.out.printf("you girlfriend was %s", getName()) , I'm getting an error. it says "change the return type of getName() to Object [] . I did everything as it is ..

  33. A A Avatar

    I don't get the point of a private variable… Wouldn't public work just as well in all situations?

  34. TheManeOfLife Avatar

    Can someone please explain when to use a return method in java programming.

  35. ThatMathNerd Avatar

    Why does bucky not like typing it takes longer to copy and paste? Does his keyboard take like 1000 newtons of force to press down a key.

  36. RockingWithHussein Avatar

    Why would I put a private String GirlName, when I can just use the public String name, in the end GirlName = name so whats the utility of having a private String ? I did exactly the same thing he did without making a private String.

  37. Crudy Barfy Avatar

    funny how sexist he is as his girlfriend is literally an object.

  38. TheRealPekka Avatar

    Can someone explain how printf and %s are working?

  39. leroytheboss Avatar

    200 thousand people gave up since the last video

  40. tennisplaya1869 Avatar

    was this able to be done in one class, or did he do it in two classes just to show how they interact? this was a little difficult to follow, since im not sure how the order works when there is more than one class.

  41. Iemand Anders Avatar

    Thanks man, I was doing terrible in programming class but you helped me understand everything a lot better!

  42. Tony Saufcok Avatar

    I program so I can make my-self a girlfriend ( อกยฐ อœส– อกยฐ)

  43. OmarDdosinq_ PVP Avatar

    wtf is the purpose of getName() method? what will happen if I called that method of tuna class in main? what does return girlName do?
    eeeeeeeeeeeeee im confused

  44. C. A. Avatar

    Why didn't he explain the printf vs the print or println?

  45. Hurricane Lambda Avatar

    I never had a gf so my first gf is ''Null'' . dammit. ๐Ÿ˜›

Leave a Reply

Your email address will not be published. Required fields are marked *