Win a copy of Raising Young Coders: A Parent’s Guide to Teaching Programming at Home this week in the General Computing forum!
Forums Login/signup

Very dumb question..back to basics...

+Pie Number of slices to send: Send
Got confussed between object of a class and thread of a class. Please explain me for my following questions:-

1) what is the difference between an object of a class and a thread of a class ?
2) Are object and thread not same in java?
3) Don't you think that both are behaving similalry in some or other way ?
4) How the threads are created (before or after loading the class)?


Thanks for your precious time.
+Pie Number of slices to send: Send
An object is like a hand puppet, and the thread is the hand that makes it move. These aren't homework problems, are they? We frown on people asking us to do their homework for them.
+Pie Number of slices to send: Send
 

An object is like a hand puppet, and the thread is the hand that makes it move.



please elaborate it with some real life example.

thanks
+Pie Number of slices to send: Send
 

Vinod Vijay wrote:

An object is like a hand puppet, and the thread is the hand that makes it move.



please elaborate it with some real life example.


http://www.youtube.com/watch?v=az01K8bLbG0
+Pie Number of slices to send: Send
I asked the explanation with some e.g. as one given by Greg Charles and not any link of any creaping video.

http://www.youtube.com/watch?v=az01K8bLbG0



Darryl Burke - This is completely not appreciable.
You should be shamfull of what you have done. Don't be so egostic. You should share your knowledge. Neither it won't harm you and nor it will reduce the part of your knowledge.
Kindly take care of that in future.
+Pie Number of slices to send: Send
All kidding aside. Like Greg already said, this sounds very much like homework questions. I would like to refer you to our policy regarding homework (here). And even if it's not homework then you should ShowSomeEffort and at least try to answer the questions yourself.
+Pie Number of slices to send: Send
 

Vinod Vijay wrote:a thread of a class ?


A thread of a class? That's the first time I heard that expression.
+Pie Number of slices to send: Send
Objects and threads are two totally different things. They are not the same, and don't really have anything to do with each other.

An object is a block of data in the computer's memory. Objects have a type (the class that the object is created from). You can call the methods defined in the corresponding class on an object, to do something with the data inside the object. Have a look at Learning the Java Language in the Java Tutorials to understand the basics of object oriented programming.

A thread is a "live" path of execution in the program. Your program can start multiple threads, to do multiple things at the same time. See Concurrency in the Java Tutorials to learn what threads are. They don't have any direct link to objects.
+Pie Number of slices to send: Send
 

Vinod Vijay wrote:

http://www.youtube.com/watch?v=az01K8bLbG0


This is completely not appreciable.


It's funny, though. Lighten up.
+Pie Number of slices to send: Send
By "appreciable" you presumably mean "acceptable".

I am going to pull rank, and stop any further potential arguments. I am not going to take sides, but simply close this thread.

Reply locked
This thread has been viewed 867 times.
Similar Threads
Threads and Synchronization examples
RequestDispatcher doubt :(
Test 340 Answers
java
Some Mock Exam Questions
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
More...

All times above are in ranch (not your local) time.
The current ranch time is
Jun 27, 2025 08:56:41.