1 2 3 > >>   Sort: Rank

Creating a New Thread
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.
2016-06-25, 434786👍, 8💬

💬 2016-06-25 Ron: You can also create an anonymous class and run it: Thread t = new Thread() { public void run() { // do whatever you want } }; t....

💬 2013-10-02 drinkin: This unmistakably created an audience for books fact that consciously offered the grand design models

💬 2013-07-23 XRumerTest: Hello. And Bye.

(More comments ...)

Binary value in Switch case
Is it possible to pass a binary value to 'case' of 'switch' statement?The control value which we are using to test is also binary. switch(binary value) { case 0000: System.out.println(" "); break; case 0001: System.out.println(" "); break; }
2014-02-20, 2199👍, 0💬

General technical question
What is the difference between Java and C++? What is the advantage of each of them? Java does not support typedefs, defines, or a preprocessor. Without a preprocessor, there are no provisions for including header files. Since Java does not have a preprocessor there is no concept of #define macros or...
2011-06-28, 3626👍, 0💬

How does one iterate through items and records in a specified block?
How does one iterate through items and records in a specified block? One can use NEXT_FIELD to iterate (loop) through items in a specific block and NEXT_RECORD to iterate through records in a block. Code example: OriPos := TO_NUMBER(:System.Trigger_Reco rd);First_Record; LOOP -- do processing IF (:S...
2011-03-22, 9842👍, 0💬

Is Ajax just another name for XMLHttpRequest?
Is Ajax just another name for XMLHttpRequest? No. XMLHttpRequest is only part of the Ajax equation. XMLHttpRequest is the technical component that makes the asynchronous server communication possible; Ajax is our name for the overall approach described in the article, which relies not only on XMLHtt...
2009-06-23, 5092👍, 0💬

How do I test my AJAX code?
How do I test my AJAX code? There is a port of JUnit for client-side JavaScript called JsUnit
2009-06-23, 4354👍, 0💬

What Is invokeLater() Method
When should the method invokeLater() be used? This method is used to ensure that Swing components are updated through the event-dispatching thread.
2007-03-03, 6834👍, 0💬

What Is Finalization
What is the purpose of finalization? The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.
2007-03-03, 7033👍, 0💬

Anonymous Classes
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.
2007-03-03, 6865👍, 0💬

Infinite Loops
How can you write a loop indefinitely? Two examples are listed in the following code: for(;;) { ... } while(true) { ... }
2007-03-03, 6481👍, 0💬

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, 5976👍, 0💬

Component Subclasses in Swing Package
Name Component subclasses that support painting? The Canvas, Frame, Panel, and Applet classes support painting.
2007-03-03, 5522👍, 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, 5357👍, 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, 5660👍, 0💬

Wrapped Classes
What are wrapped classes? Wrapped classes are classes that allow primitive types to be accessed as objects.
2007-03-03, 5476👍, 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, 6467👍, 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, 7451👍, 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, 5072👍, 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, 5262👍, 0💬

Vector Class
What is the Vector class? The Vector class provides the capability to implement a growable array of objects
2007-03-03, 4828👍, 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 && a.length()>10) { ... } A single ampersand here would lead to a NullPointerException.
2007-03-03, 4933👍, 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, 4938👍, 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, 4870👍, 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, 5020👍, 0💬

1 2 3 > >>   Sort: Rank