Java Video Tutorial 2

Java Video Tutorial 2In this video I continue where I left you in part 1 of the Java Video Tutorial. Definitely watch it first.

Here I show you how to import class libraries, except user input, check for valid input, catch errors in input, a bunch of math functions and more.

All of the code follows the video. You should print it out because it will greatly help you to understand the code better.

If you like videos like this share them [nttfblike]

Code From Video

57 thoughts on “Java Video Tutorial 2”

  1. Great tuts Derek. There is one rule here 🙂 When you want to learn something, almost every journey on finding youtube tutorials ends up on some of your series. 🙂

  2. How much will it cost to download the java videos? I travel alot and so my connection is not the most reliable. thanks

    1. I don’t charge anything. A site like Keepvid will allow you to download any YouTube video from what I’ve heard? The only reason why I don’t make the videos very easy to download is because a bunch of people started downloading and then selling them. It’s still possible to do though

      1. selling? wow. thats so wrong. I wanted to view your lessons on my tablet while I travel as thats when I have the most time to devote in front of a screen to learn, otherwise I’m gaming inbetween. You should setup at udemy.com and make if ongoing. the java tutorials there suck. I like the way you are very thorough in your explanations and use of plain english. well, kudos for this. keep up the excellent job.

        1. Yes I get offered money to sell my videos all of the time. I like giving them away for free. It makes me feel good to help people. I’m not very money motivated. Thanks for the idea though

  3. Super derek.i love your expalation.you making it so simple man.no need of referring to any textbooks.can you explain us some of the frameworks.

  4. Please tell me where I am wrong as and in this program after it gets compiled suppose i press a number and enter then nothing gets printed and then again if I press another number , it gets printed… Plz help!!!

    import java.util.Scanner;
    public class JavaLessonTwo {
    static Scanner userInput = new Scanner(System.in);

    public static void main(String[] args) {

    int Scanner = userInput.nextInt();

    if(userInput.hasNextInt())
    {
    int numberEntered = userInput.nextInt();
    System.out.println(“The number you entered is :” + numberEntered);

    }
    }

    }

  5. Just wondering, If I were to create a basic calculator with some integers, how would I make it so the number the user entered would be added to the second number the user entered.

    1. import java.util.scanner;

      Public class Basic calculator
      {
      static Scanner userInput = new Scanner(System.in);
      {
      Public static void main(string []args)
      {

      if (userInput.hasNextInt())

      int numberEntered = userInput.nextInt();

      {
      sytem.out.println(“Enter a number”)

      *Not sure where to go after this*

  6. Great vids. I have a couple of questions.

    1. Is there a difference between numberEntered++ and ++numberEntered? Or is it just a preference thing?

    2. I’ve noticed you use a lot of functions within other classes like min/max in the math class. My question is how do you know that class contains those functions? Is there a pretty list out there within ecclipse that lets you know what functions are within a certain class? Or do you just memorize this? I was recently told to sort numbers within an array and it would have helped if I knew that the Array class had a sort function :/

    1. Thank you 🙂 numberEntered++ uses the original value of numberEntered in an operation and then increments it after. ++numberEntered would increment first and then use the new value in an operation. Does that make sense?

      I’m not big on memorizing. Naturally you’ll just remember things like this through repetition. I use the Java API when I want to know what methods an object may have.

  7. i want to ask one favour derek sir …i’m a college guy from india.
    recently i came across ur java tutorials,which i guess r realy gud or rather best till d date…
    so the problem is i want to download all of the core java tutorials coz i will be leaving for college in 10 days… but the data is quite large…n my net is not very gud…
    so cud u plz find any way to compress them or rather highly compress them n we people can decompress thm wid the tools u compress.. videos in 720p will do the work…
    n sorry if i had asked too much….

    1. Hi, I’m sorry, but my hosting company will not allow me to offer the videos through direct download off my site. I put everything on YouTube because they provide the best streaming. I wish there was something I could do 🙁

  8. Really an interesting tutorial – truely well presented and gripping!
    It would be most greatfully appreciated if you would kindly advise and instruct how to write a Program Design Language (PDL) version of the above code, please.
    Thanks again for your great tutorials. Hope there is no stopping you.

      1. Thank you, Derek, for the kind instructions leading further into your extensive collection of great tutorials. I am most greatful for your most helpful advice. Thanks again.

  9. Derek, I learned Jquery from videos and I love your way to explain. Thanks man…
    It will help me to recollect my Java skills.

  10. Im currently in a Java class. Thank you for putting out these videos. Can you please tell me which video explains constructors in a class?

    Thank you,

    Tim

  11. Thank you again, i have to take a class based on Java but I am only familiar in c++, that was like 2 yeArs ago these tutorials are helpings out a whole bunch…thank you

  12. Thank you for this.
    I do shell scripting as part of my job, however am going back to school and before picking up my compilers class after AGES, will be going through all your tutorials. It looks like it’s got a fantastic pace and very clear directions.
    Cheers-
    T

  13. You makes the Java learning really easy. I hate learn java from books, so i loves watching your videos.
    Thanks

  14. This is really amazing. I started watching some java tutorial videos on udemy and it has definitly nothing to do with yours. You easily surpass any of its videos by just a few words and the way you organize your work and actually show it to the people. Its motivating. I hope you stick around for a very long time. I’ve got much to learn yet ;P .

    Keep up the excelent work Derek. You are definitly a masterpiece when it comes to tutorials.

    Best of luck!

    1. Thank you for all the nice compliments 🙂 It is always nice to hear that I’m providing videos for free to compare well against the expensive courses others are putting out. Many more are coming.

Leave a Reply

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