THE PACKAGE JAVA.LANG
java.lang.Object
20.1
a
CloneNotSupportedException
 is thrown. Note that all arrays are considered
to implement the interface
Cloneable
. Otherwise, this method creates a new
instance of the class of this object and initializes all its fields with exactly the con 
tents of the corresponding fields of this object, as if by assignment; the contents of
the fields are not themselves cloned. Thus, this method performs a  shallow copy 
of this object, not a  deep copy  operation.
The class
Object
 does
not
 itself implement the interface
Cloneable
, so call 
ing the
clone
 method on an object whose class is
Object
 will result in throwing
an exception at run time. The
clone
 method is implemented by the class
Object
as a convenient, general utility for subclasses that implement the interface
Cloneable
, possibly also overriding the
clone
 method, in which case the over 
riding definition can refer to this utility definition by the call:
super.clone()
20.1.6
public final void wait()
throws IllegalMonitorStateException,
InterruptedException
This method causes the current thread to wait until some other thread invokes the
notify
 method ( 20.1.9) or the
notifyAll
 method ( 20.1.10) for this object.
In other words, this method behaves exactly as if it simply performs the call
wait(0)
 ( 20.1.7).
20.1.7
public final void wait(long millis)
throws IllegalMonitorStateException,
InterruptedException
This method causes the current thread to wait until either some other thread
invokes the
notify
 method ( 20.1.9) or the
notifyAll
 method ( 20.1.10) for
this object, or a certain amount of real time has elapsed.
This method may be called only when the current thread is already synchro 
nized on this object. If the current thread does not own the lock on this object, an
IllegalMonitorStateException
 is thrown.
This method causes the current thread (call it
T
) to place itself in the wait set
( 17.14) for this object and then to relinquish any and all synchronization claims
on this object. Thread
T
 becomes disabled for thread scheduling purposes and lies
dormant until one of four things happens:
461






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved