<< < 1 2 3   Sort: Date

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

CLASSPATH Environment Variable
If a class is located in a package, what do you need to change in the OS environment to be able to use it? You need to add the directory or the jar file that contains the package to the CLASSPATH environment variable. Let's say a class Employee belongs to a package com.xyz.hr; and is located in the ...
2007-03-03, 5213👍, 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, 5062👍, 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, 5051👍, 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, 4980👍, 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, 4910👍, 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, 4907👍, 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, 4851👍, 0💬

Vector Class
What is the Vector class? The Vector class provides the capability to implement a growable array of objects
2007-03-03, 4811👍, 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, 4335👍, 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, 3607👍, 0💬

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

<< < 1 2 3   Sort: Date