answersLogoWhite

0


Best Answer

A thread and a process are same but a minor difference is there.

Process executes a program completely without splitting whereas a thread splits a program into smaller tasks and then execute them separately.And then combine the final result.

that is why a process is often called as Heavy weight and a thread is called as light weight.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

There are two ways of creating a thread.

1. Extending the Thread class

Ex: public class ThreadExample extends Thread {

.....

}

2. Implementing the Runnable Interface

Ex: public class ThreadExample implements Runnable {

...........

}

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

In Java, "thread" means:

• A thread of execution

A thread of execution is an individual process that has its own call stack. In Java, there is one thread per call stack or, to think of it in reverse, one call stack per thread. Even if you don't create any new threads in your program, threads are there running without your knowledge.

If you are curious and ask me how? Just stop for a moment and think how you would execute a java program? You'll write a main method and then execute it from the command line using the "java" command. Well, you have already answered the question because, when your main method starts, the JVM assigns a thread for this main method and assigns it a call stack. So, even though you did not intentionally create a thread, the system did one for you.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

A Thread is simply a concurrently running task that is separate from the main line of execution. You can make any class into a thread by implementing the Runnable interface.

For more information about the Thread class, consult your Java API. The API has all the basic information about using Java threads.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

A thread refers to a different parallel line of execution. In java exist a class that let you create this execution line. The Thread class.

This execution capability is generally used to implement interactive interfaces meanwhile a large process is performed in background.

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

Briefly, it means that you can have several processes that can run simultaneously. If the computer on which the program runs has enough available processors, then the execution will truly be simultaneous; if there are more processes (threads) than processors, then time-sharing will be applied, i.e., one of the processes may run for a fraction of a second, then the next one, etc. - and it may still look as if they run simultaneously.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Its Single path of execution in a program

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is meant by a thread in java programming language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is jython?

Jython is a version of the Python programming language that is integrated with the Java programming language, allowing you to mix Java and Python code and run both on the Java Virtual Machine.


Why java is 100 percent programming language?

There are no 'partial' programming languages.


Is java a hardware platform?

No. It is a programming language


What programming language does minecraft use?

Java


What is meant by development and deployment in java programming language?

These terms are not limited to Java programming. Development refers to anything having to do with creating a program. Design and implementation fall under this category. Deployment is delivering the program to other people.

Related questions

What programming language are java applets written in?

Java applets are written in the Java programming language. Java is considered to be one of the oldest and most commonly used programming languages in the world.


Which type of language is java?

Java is truly object oriented programming language


Is the best institute for learn java programming in Pakistan?

The Java programming language is a general-purpose computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible. Then you learn java programming language in Pakistan get the best java programming classes at the lowest cost.


Is java a database?

No, its a programming language.


Is java DBMS?

no, Java is not dbms.. Java is a programming language Dbms is database


What is jython?

Jython is a version of the Python programming language that is integrated with the Java programming language, allowing you to mix Java and Python code and run both on the Java Virtual Machine.


Why java is 100 percent programming language?

There are no 'partial' programming languages.


Is java a hardware platform?

No. It is a programming language


What programming language does minecraft use?

Java


Is java example of a procedural programming language?

No.Its purely object oriented programming language


What are differences between PHP and Java?

PHP and Java.. hummPHP is a programming language to make websites and scripts on the web.. while Java is an hardware programming language, please be advised that you can use Java applications on the web by using applets...But generally Java will be used to develop hardware applications..But if you meant JavaScript instead of Java:JavaScript is an client side language that help you change/modify your elements on your website without reloading page.


What is meant by development and deployment in java programming language?

These terms are not limited to Java programming. Development refers to anything having to do with creating a program. Design and implementation fall under this category. Deployment is delivering the program to other people.