how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread
Answer / Krish
A multithreaded program can be created in Java by creating multiple Thread objects and starting them. There are two primary ways to create threads: extending the 'Thread' class or implementing the 'Runnable' interface.nnWhen a new thread is created and started, its initial state is NEW. After the start() method call, it transitions through various states: RUNNABLE (it can now execute), BLOCKED (if waiting for a lock), and TERMINATED (once the thread has completed execution).
| Is This Answer Correct ? | 0 Yes | 0 No |
Write a program to print count of empty strings in java 8?
Difference between doublesummarystatistics, intsummarystatistics and longsummarystatistics ?
Howmany number of objects we can store in an ArrayList. Is there any limit?
Explain listiterator and methods in listiterator?
What do you mean by object?
Can a vector contain heterogenous objects?
what is mutability?which one is mutable String or StringBuffer?and why?give examples of each which shows the mutability of each String or StringBuffer
What is the purpose of assert keyword used in jdk1.4.x?
define the terminology association.
Can you override a private or static method in java?
what is the constructor and how many types of constructors are used in java?
What does the append?