![]() |
| Home | Tech FAQ | Interview Questions | Placement Papers | Tech Articles | Learn | Freelance Projects | Online Testing | Geeks Talk | Job Postings | Knowledge Base | Site Search | Add/Ask Question |
![]() Related Questions Objects that subclass the Observable class maintain a list of observers. When anObservable object is updated it invokes the update() method of each of its observers tonotify the observers that it has changed Latest Answer : Observer observe only those class which are Observable. ... With respect to multithreading, synchronization is the capability to control the access ofmultiple threads to shared resources. Without synchronization, it is possible for onethread to modify a shared Latest Answer : Synchronization is the mechanism that ensures that only one thread is accessed the resources at a time. In a practical point of view assume that two threads are trying to update bank balance at the same time!!! How we can solve this issue the answer is sychronization. ... Yes, a lock can be acquired on a class. This lock is acquired on the class's Class object.. Latest Answer : As your might already know, any synchronisation needs an object (monitor) to acquire lock one. See below for the three different types on how to synchronise code.public class A{ // A monitor object of sycnhronising piece of code. private ... It uses those low order bytes of the result that can fit into the size of the type allowed bythe operation. Latest Answer : In java there is no point of overflow and underflow, it was there in C. For avoiding that java introduces type casting. Java will allow some more space from the defult space of primtive type. ... The EventObject class and the EventListener interface support event processing. Latest Answer : Java.util.Event class ... Under preemptive scheduling, the highest priority task executes until it enters the waitingor dead states or a higher priority task comes into existence. Under time slicing, a taskexecutes for a predefined Latest Answer : 1. Pre-emptive Scheduling.Ways for a thread to leave running state -· It can cease to be ready to execute ( by calling a blocking i/o method)· ... A native method is a method that is implemented in a language other than Java. Latest Answer : Informs the compiler that the method has been used in a non-java platform and used only with the methods. ... The java.awt.AWTEvent class is the highest-level class in the AWT event-classhierarchy. A thread is in the ready state after it has been created and started. Most of the AWT-related events of the event-delegation model are defined in thejava.awt.event package. The AWTEvent class is defined in the java.awt package.
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||