Java Video Tutorial 5

[ad_1]
Code is Here:

Best Java Book :

Here I continue my Java Video Tutorial by covering methods, or functions in Java.

I spend a considerable amount of time on those things that tend to confuse people who are learning Java. I review how class variables differ from local variables and provide numerous examples of methods.


Posted

in

by

Tags:

Comments

38 responses to “Java Video Tutorial 5”

  1. Enis Gusinac Avatar

    If this is not complex thing.. than I am a real amateur.

  2. K. ALMAZ Avatar

    Best method to learn java!

  3. Bilal Hameed Avatar

    what does int guessResults = 1 and randomGuess = 0 do in this function/statement?

  4. Ali The Flying Tiger Avatar

    after watching your first your tutorials.I think you are more talented than justin bieber.

  5. Nate Arutnev Avatar

    Wait, what exactly do methods do at around 1:35?

  6. blackneos940 Avatar

    Thank you for making these Videos, good sir….. :3 I'm a C Programmer who wants to buff up his skills in Java….. :3 They're very informative, and make it easier to understand Java….. 🙂 (It also doesn't hurt to have a background in C…..) 😀 Have a good day, ok…..? :3

  7. Fredrik A Avatar

    Big thanks to you Derek for doing this, these videos are excellent. I took Java as a class about 5 years ago and now finding myself having to urgently refresh my memory. Been programming in other languages during the time but Java has its "quirks".
    You're a hero 🙂

  8. argun aman Avatar

    Shouldnt "Global 3.141559" be written before "Local 3.0" at 5:00 when you run the program? Can someone explain why its in the opposite order?

  9. Shaikh Asad Avatar

    good for beginners but little fast!! thanks

  10. Evgeni Kuzmov Avatar

    why do you return "1" if you add 1 and 2 it's 3

  11. Akbar Zubairi Avatar

    Derek,
    I know some of these videos are a bit old and not sure if you still reply to these Comments.
    I have gone through many of your Videos (PHP, WordPress, JAVA. and Andriod.
    As a matter affect My first App was written in JAVAFX hibernate with sql for Management.
    I did get your verizon email from one of the video but didn't feel comfortable sending you email directly.
    Just wanna say Thank you So Much for all that you are doing and did..
    🙂

  12. Cyber passion Avatar

    Can you elaborate about the math library of java programming language? If you do that I will kiss you

  13. lincoln mercedes Avatar

    one thing i didn't understand is at 5:00 the first value that was printed in 3.0 not 3.14159 ,why?

  14. AoE Ronin Avatar

    I had one or two other questions too lemme try to remember em

  15. AoE Ronin Avatar

    Dang that was a fast reply, i didn't even notice it til now.
    Anyway, I don't quite understand how the static methods work… so ya, how do they work?

  16. AoE Ronin Avatar

    Derek, do you still respond to old videos?

  17. gtb7878 Avatar

    But if I write -1 the program doesn't give a correct answer :>

  18. kamal kanel Avatar

    Hello, Could you please explain to me what this is "guessResult = checkGuess(randomGuess);"
    Especially why is it like this: "checkGuess(randomGuess)"
    Thank you!

  19. Vj Grimes Avatar

    Mystery. At 3:46. How did he correct the comment code? Pointer is swirling around somewhere towards the bottom when he does something and the double forward slash fixes itself. Hmm. I tried Ctrl-s and I tried Ctrl-Shift f. Looks like an autoCorrect. How'd it do that?

  20. Amrit Sharma Avatar

    which software do you use to implement java prog.

  21. Surya Chodisetti Avatar

    Hi, Thank you very much for posting the videos. Can you please explain 1:37 "if you ever want to create a method that's not going to be part of a class definition". It's a bit confusing as a class encloses all the methods.
    Thanks again videos are very helpful.

  22. Ms. Rey Avatar

    is it compulsary to initialize randomGuess?we can skip that statement?

  23. David Shukurov Avatar

    OK i've got a question: in this code random number will be showed in the beginning of executed code. how can i generate a random number without printing it on the console board? i mean to hid it or something else
    P.S: Great lessons really like them learnt so much, thanks dude!

  24. mrbigbrownbeaver Avatar

    This "Well hello internet" gets me every time. Great tutorial.

  25. Przemek Mirowski Avatar

    You are a brilliant teacher!

  26. element74 Avatar

    4:57 in the console, why did the print line for local return first, and not the print line for global?

  27. Evgeni Kuzmov Avatar

    what if someone would have typed -1 ?

  28. Lewis Lebentz Avatar

    Do you have a video where you explain using 'this.' with variables? That always confuses me.

  29. BLOOD WOLF Avatar

    public static int getRandomNum ()
    {
    randomNumber = (int)(Math.random() * 51);
    return randomNumber;
    }
    public static int checkGuess(int guess)
    {
    if(guess == randomNumber)
    {
    return -1;

    }else {return guess;}

    Im getting a cannot convert a double into an integer with the return randomNumber; and once I add (int) before randomNumber; then it allows me to run the program (neon 2.0) why did that not error for you?
    randomNumber = (int)…….
    return (int) randomNumber;

  30. 조민기 Avatar

    That probability was 0.98*0.98*0.02. How lucky

  31. Mano Ranjith Avatar

    What happens when you replace all the 'd' with 'myPi' at 8.08 in this video ?
    Can we actually declare a variable in main which has same name as the class variable

  32. chinmay kamath Avatar

    Hello and thanks for this amazing tutorial Derek! I had a question, in the last example of guessing the random number in the while loop I tried using while(1) instead of while(guessResult != -1) and I got an error message saying can't convert from int to boolean. Why I did this was if I entered -1 instead of a number between 0 to 50 it directly printed the random number generated (which is due to the guessChecker function if I'm not wrong) So my question was is there a way I can make the loop run again and again until the correct number is guessed without actually using != int in the while loop and what exactly is this 'can't convert from int to boolean' error message? Sorry if it's a silly question and thanks again!

  33. Bedemariam Degef Avatar

    Can you have multiple main methods and will they be execute at the same time

  34. Bedemariam Degef Avatar

    Can you have multiple main methods and will they be execute at the same time

  35. Peace Avatar

    Do you have any videos on Spring Boot too? I really need to learn Spring Boot as quickly as possible. Thanks

  36. Denzi pants Avatar

    I type along as you type but i acnt figure out why i get an error at getRandomNum() {…}
    method
    "Type mismatch: cannot convert from double to int"

    I did cast it to be an int. Just like you did. I an wondering why this error occurs
    Here is the code:

    public static int getRandomNum() {
    randomNumber = (int) (Math.random() * 51);

    return randomNumber;

    }

  37. MikiPiki Avatar

    Can you have different methods/functions in separated .java/.cass or do you need to write them all in the same .java/.class?

  38. Youssef Samwel Avatar

    derek what version of java is in this series.

Leave a Reply

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