<< < 17 18 19 20 21 22 23 24 25 26 27 > >>   Sort: Rank

Native Method
What is a native method? A native method is a method that is implemented in a language other than Java.
2007-03-03, 5963👍, 0💬

Component Subclasses in Swing Package
Name Component subclasses that support painting? The Canvas, Frame, Panel, and Applet classes support painting.
2007-03-03, 5505👍, 0💬

Preemptive Scheduling
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...
2007-03-03, 5340👍, 0💬

Garbage Collection
Does garbage collection guarantee that a program will not run out of memory? No, it doesn't. It is possible for programs to use up memory resources faster than they are garbage collected. It is also possible for programs to create objects that are not subject to garbage collection.
2007-03-03, 5637👍, 0💬

Wrapped Classes
What are wrapped classes? Wrapped classes are classes that allow primitive types to be accessed as objects.
2007-03-03, 5460👍, 0💬

Vector and ArrayList Classes
What is the main difference between a Vector and an ArrayList? Java Vector class is internally synchronized and ArrayList is not.
2007-03-03, 6439👍, 0💬

ASCII, Unicode, UTF-8 and UTF-16
How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters? Unicode requires 16 bits and ASCII require 7 bits. Although the ASCII character set uses only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18 bit patterns. UTF-16 uses 16-bi...
2007-03-03, 7410👍, 0💬

Protected Methods
If a method is declared as protected, where may the method be accessed? A protected method may only be accessed by classes or interfaces of the same package or by subclasses of the class in which it is declared.
2007-03-03, 5057👍, 0💬

Modifiers on Inner Classes
What modifiers may be used with an inner class that is a member of an outer class? A inner class may be declared as public, protected, private, static, final, or abstract.
2007-03-03, 5240👍, 0💬

Vector Class
What is the Vector class? The Vector class provides the capability to implement a growable array of objects
2007-03-03, 4814👍, 0💬

NullPointerException on String Objects
What can go wrong if you replace &emp;&emp; with &emp; in the following code: String a=null; if (a!=null &amp;&amp; a.length()&gt;10) { ... } A single ampersand here would lead to a NullPointerException.
2007-03-03, 4915👍, 0💬

Inner Class Declared inside a Method
Can an inner class declared inside of a method access local variables of this method? It's possible if these variables are final.
2007-03-03, 4917👍, 0💬

Differences 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...
2007-03-03, 4855👍, 0💬

Acquiring a Lock on an Object
What happens when a thread cannot acquire a lock on an object? If a thread attempts to execute a synchronized method or synchronized statement and is unable to acquire an object's lock, it enters the waiting state until the lock becomes available.
2007-03-03, 4995👍, 0💬

sleep() and yield() Methods
What is the difference between yielding and sleeping? When a thread invokes its yield() method, it returns to the ready state. When a thread invokes its sleep() method, it returns to the waiting state.
2007-03-03, 5668👍, 0💬

States of a Thread
What are the high-level thread states? The high-level thread states are ready, running, waiting, and dead.
2007-03-03, 6604👍, 0💬

wait(), notify() and notifyAll() Methods
What is the purpose of the wait(), notify(), and notifyAll() methods? The wait(),notify(), and notifyAll() methods are used to provide an efficient way for threads to communicate each other.
2007-03-03, 6513👍, 0💬

Invoking run() Method of a Thread
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.
2007-03-03, 6489👍, 0💬

Order of Exception Catch Clauses
Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written? Yes, it does. The FileNoFoundException is inherited from the IOException. Exception's subclasses have to be caught first.
2007-03-03, 6560👍, 0💬

List of Waiting Threads on an Object
Can each Java object keep track of all the threads that want to exclusively access to it?
2007-03-03, 7147👍, 0💬

Locking Objects for Exclusive Use
Can Java object be locked down for exclusive use by a given thread? Yes. You can lock an object by putting it in a "synchronized" block. The locked object is inaccessible to any thread other than the one that explicitly claimed it.
2007-03-03, 7007👍, 0💬

Multi-Threading
How does multi-threading take place on a computer with a single CPU? The operating system's task scheduler allocates execution time to multiple tasks. By quickly switching between executing tasks, it creates the impression that tasks execute sequentially.
2007-03-03, 8026👍, 0💬

What Is Thread
What is thread? A thread is an independent path of execution in a system.
2007-03-03, 7978👍, 0💬

equals() - String Comparison
What would you use to compare two String variables - the operator == or the method equals()? You can use operator == and method equals() for different types of comparisons: Using operator == to compare two string variables to see if they point the same String object. Using equals() to compare two st...
2007-03-03, 6480👍, 0💬

<< < 17 18 19 20 21 22 23 24 25 26 27 > >>   Sort: Rank