Java Video Tutorial 17


Video is ready, Click Here to View ×

Code Here:

Best Java Book :

In this Java Video Tutorial I cover how to use Java threads.

A thread is just a block of code that is expected to execute while other blocks of code execute. That’s it. When you want to execute more than one block of code at a time you have to alert Java.

45 thoughts on “Java Video Tutorial 17

  1. why my same code is giving error saying – Exception in thread "main" java.lang.RuntimeException: Uncompilable source code – constructor getTheMail in class getTheMail cannot be applied to given types;
    required: no arguments
    found: int
    reason: actual and formal argument lists differ in length
    at mainTime.main(
    C:UsersuserAppDataLocalNetBeansCache8.2executor-snippetsrun.xml:53: Java returned: 1
    BUILD FAILED (total time: 6 seconds)

  2. dude you have the potential to post 'A' quality tutorials but you're limiting yourself to 'B' because you dont take the time to talk about the theory and thought processes. Telling someone how to type a thread is easy but its when you teach someone how to KNOW how to build threads is what the students need. It just makes it so much more difficult to learn.

    What needs to happen is you to go more in depth. think about your wordings more.

  3. I've got a question – in GetTime 20 I've changed Thread(2000) to Thread(1000). It executes fine but after first Checking Mail it stops. I've changed it back and now it continue after first check. Why so?

  4. You saved my head from getting blasted. Your tutorial helped me to get the use of thread.
    wouldn't that be great if you plan a day in a week or so to answer doubts real time.. only if it's comfotable for you.. pls

  5. I find we need this cord.

    Thread getMailThread = new Thread(getmail);

    But, you just used this.
    new Thread(getMail).start();

    how come you can use that one? I don't get one.

  6. How can I get output that is not a String, Integer or stuff like that but something like a green circle or maybe a more complex shape? Do I need another program or can I maybe just modify the "System.out." command?

  7. Hey Derek i have a quick question. In OOP language when creating a object/ instance you have to declare in this fashion
    C++ (Class) (object name) (constructor); in Java (Class) (object name) = new (Class) (constructor);. in the case of the DateFormat
    you created 2 instances timeFormatter & dateFormatter but did not use the syntax stated above. instead it uses a (Class)(Method)(args)
    syntax. i have look around on the oracle website but no explanation as to why it is created this way can out elaborate on why it uses a
    different syntax thanks 😀

  8. Hey Derek. I'm from Bangladesh. From the beginning of my Java Course in my University I follow your videos. You are the reason of my good marks in Java till now. I never thought my country would be mentioned here. It felt good. Thanks for the awesome videos. 🙂

  9. The thing I love about your videos is they aren't intimidating. Even if I don't know something, I'm not scared away by it because you explain it so well. Keep up the great work! Glad to finally get an understanding of threads.

Leave a Reply

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