File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes how class make singleThreaded? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how class make singleThreaded?" Watch "how class make singleThreaded?" New topic

how class make singleThreaded?

Sukhadev Patil

Joined: Apr 12, 2006
Posts: 12
how i make a class singleThreaded and FIFO type?
mohit bahl
Ranch Hand

Joined: Mar 22, 2006
Posts: 48
hi Sukhadev

Please do not multiple posts for the same question and if you have something to else to ask then you can ask the same in the thread that you started.


to err is human, but the company policy doesn't allow it!
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15087

Properties like single or multithreaded and FIFO or not are not properties of a class.

Your question does not make sense.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Describe your need a bit. Making a class single threaded is not common language in Java, so I'm not sure what you're up to.

If you want to make sure that only one thread is executing methods on a given object instance, make all the methods synchronized.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link:
subject: how class make singleThreaded?
It's not a secret anymore!