<< < 3 4 5 6 7 8 9 10 11 12 13 > >>   Sort: Date

What is the difference between the Font and FontMetrics classes?
What is the difference between the Font and FontMetrics classes? The FontMetrics class is used to define implementation-specific properties, such as ascent and descent, of a Font object
2012-07-17, 2400👍, 0💬

Can each Java object keep track of all the threads that want to exclusively access to it?
Can each Java object keep track of all the threads that want to exclusively access to it? Yes. Use Thread.currentThread() method to track the accessing thread.
2012-06-13, 2399👍, 0💬

What is the highest-level event class of the event-delegation model?
What is the highest-level event class of the event-delegation model? The java.util.EventObject class is the highest-level class in the event-delegation class hierarchy.
2012-12-05, 2395👍, 0💬

What is the Map interface?
What is the Map interface? The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with values.
2012-07-20, 2395👍, 0💬

How to create a thread in a program?
How to create a thread in a program? You have two ways to do so. First, making your class "extends" Thread class. Second, making your class "implements" Runnable interface. Put jobs in a run() method and call start() method to start the thread.
2012-06-11, 2395👍, 0💬

What is synchronization and why is it important?
What is synchronization and why is it important? With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of...
2012-05-31, 2395👍, 0💬

When should the method invokeLater()be used?
When should the method invokeLater()be used? This method is used to ensure that Swing components are updated through the event-dispatching thread.
2012-06-29, 2390👍, 0💬

What are the different identifier states of a Thread?
What are the different identifier states of a Thread? The different identifiers of a Thread are: R - Running or runnable thread S - Suspended thread CW - Thread waiting on a condition variable MW - Thread waiting on a monitor lock MS - Thread suspended waiting on a monitor lock
2013-02-07, 2387👍, 0💬

What is design by contract?
What is design by contract? The design by contract specifies the obligations of a method to any other methods that may use its services and also theirs to it. For example, the preconditions specify what the method required to be true when the method is called. Hence making sure that preconditions ar...
2012-08-15, 2380👍, 0💬

What is the difference between Process and Thread?
What is the difference between Process and Thread? A process can contain multiple threads. In most multithreading operating systems, a process gets its own memory address space; a thread doesn't. Threads typically share the heap belonging to their parent process. For instance, a JVM runs in a single...
2012-06-18, 2379👍, 0💬

What would you use to compare two String variables - the operator == or the method equals()?
What would you use to compare two String variables - the operator == or the method equals()? I'd use the method equals() to compare the values of the Strings and the == to check if two variables point at the same instance of a String object.
2012-06-07, 2379👍, 0💬

Can an anonymous class be declared as implementing an interface and extending a class?
Can an anonymous class be declared as implementing an interface and extending a class? An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.
2012-06-28, 2377👍, 0💬

Why do threads block on I/O?
Why do threads block on I/O? Threads block on I/O (that is enters the waiting state) so that other threads may execute while the I/O Operation is performed.
2012-09-14, 2376👍, 0💬

Name the containers which uses Border Layout as their default layout?
Name the containers which uses Border Layout as their default layout? Containers which uses Border Layout as their default are: window, Frame and Dialog classes.
2012-05-21, 2375👍, 0💬

Can a lock be acquired on a class?
Can a lock be acquired on a class? Yes, a lock can be acquired on a class. This lock is acquired on the class's Class object.
2012-06-05, 2374👍, 0💬

How many methods in Object class?
How many methods in Object class? This question is not asked to test your memory. It tests you how well you know Java. Ten in total. clone() equals() & hashcode() getClass() finalize() wait() & notify() toString()
2012-06-29, 2370👍, 0💬

What invokes a thread's run() method?
What invokes a thread's run() method? After a thread is started, via its start() method of the Thread class, the JVM invokes the thread's run() method when the thread is initially executed.
2012-06-14, 2370👍, 0💬

What do you understand by Synchronization?
What do you understand by Synchronization? Synchronization is a process of controlling the access of shared resources by the multiple threads in such a manner that only one thread can access one resource at a time. In non synchronized multithreaded application, it is possible for one thread to modif...
2012-05-22, 2367👍, 0💬

How could Java classes direct program messages to the system console, but error messages, say to a file?
How could Java classes direct program messages to the system console, but error messages, say to a file? The class System has a variable out that represents the standard output, and the variable err that represents the standard error device. By default, they both point at the system console. This ho...
2012-05-18, 2364👍, 0💬

What restrictions are placed on the values of each case of a switch statement?
What restrictions are placed on the values of each case of a switch statement? During compilation, the values of each case of a switch statement must evaluate to a value that can be promoted to an int value.
2012-12-04, 2362👍, 0💬

How can a GUI component handle its own events?
How can a GUI component handle its own events? A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener.
2012-07-24, 2362👍, 0💬

What is a Java package and how is it used?
What is a Java package and how is it used? A Java package is a naming context for classes and interfaces. A package is used to create a separate name space for groups of classes and interfaces. Packages are also used to organize related classes and interfaces into a single API unit and to control ac...
2012-08-08, 2359👍, 0💬

What is the difference between preemptive scheduling and time slicing?
What is the difference between preemptive scheduling and time slicing? Under preemptive scheduling, the highest priority task executes until it enters the waiting or dead states or a higher priority task comes into existence. Under time slicing, a task executes for a predefined slice of time and the...
2012-06-26, 2359👍, 0💬

Why would you use a synchronized block vs. synchronized method?
Why would you use a synchronized block vs. synchronized method? Synchronized blocks place locks for shorter periods than synchronized methods.
2012-07-27, 2358👍, 0💬

<< < 3 4 5 6 7 8 9 10 11 12 13 > >>   Sort: Date