answersLogoWhite

0

What is the difference between a constructor and a thread?

Updated: 8/18/2019
User Avatar

Wiki User

13y ago

Best Answer

These concepts are two different things.

A 'Constructor' is a special method with the same class name and with no return type definition, invoked only when we create a new object (when we instantiate our object with the 'new' operator). An is used to initialize our object state (our instance variables).

A thread is a separate process which runs in parallel (at the same time) in a program.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between a constructor and a thread?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between implicit and explicit call of constructor in c plus plus?

An implicit constructor call will always call the default constructor, whereas explicit constructor calls allow to chose the best constructor and passing of arguments into the constructor.


What is the difference between thread and virus?

A virus runs in a thread, as do all programs. The difference between a generic thread and a virus is that the thread may not be harmful, while the virus generally is.


What is difference between constructor and destructor in net?

dono lah bodo


What is the difference between a thread and post?

In computing terms - A 'thread' is a topic of discussion, and a 'post' is a response to the 'thread'.


What is the difference between thread rope and string?

The difference between thread rope and string is that thread is more thicker than string and that string is more thinner than rope and thread is more thinner than rope there's your answer geese


Is thread as used by Intel in their marketing for Hyper-Threading Technology same as the thread that is talked about when discussing the difference between a process and a thread?

No.


What is the difference between rope and string?

The difference between thread rope and string is that thread is more thicker than string and that string is more thinner than rope and thread is more thinner than rope there's your answer geese


What is the difference between suspending stopping a thread?

Stop threading terminates the thread and cannot be resumed whereas suspend puts thread to sleep indefinitely and it can be resumed.


What is the difference between process and thread?

Basically no difference, except that process can use many threads; thread can use only one.


What is difference between thread based and use based strategies for integretion testing in object - oriented methodology?

difference b/w thread based and use based testing


What is the difference between internal flush and full hole thread?

The difference between internal flush and full hole thread is that the roots of the full-hole tool joints are rounded, and the roots for the internal-flush joints are flat.


What is the difference between the constructor to and destructor?

Functions and Constructors are similar in many ways. They can have arguments, they can have any amount of code, they can access the class's variables etc. the only difference is that a method in java needs to mandatorily have a return type but a Constructor in java cannot have a return type. It always creates and returns an object of the class for which it is the constructor. You cannot return a value from a constructor explicitly and if you try to do that, the compiler will give an error. The system knows that the purpose of the constructor is to create an object of the class and it will do the same irrespective of whether you declare a return type or not.