<< < 4 5 6 7 8 9 10 11 12 13 14 > >>   Sort: Rank

What is the package?
What is the package? The package is a Java namespace or part of Java libraries. The Java API is grouped into libraries of related classes and interfaces; these libraries are known as packages.
2013-02-21, 2344👍, 0💬

What is the Java API?
What is the Java API? The Java API is a large collection of ready-made software components that provide many useful capabilities, such as graphical user interface (GUI) widgets.
2013-02-20, 1969👍, 0💬

What is the Java Virtual Machine?
What is the Java Virtual Machine? The Java Virtual Machine is a software that can be ported onto various hardware-based platforms.
2013-02-20, 1981👍, 0💬

What is the main difference between Java platform and other platforms?
What is the main difference between Java platform and other platforms? The Java platform differs from most other platforms in that it's a software-only platform that runs on top of other hardware-based platforms. The Java platform has three elements: Java programming language The Java Virtual Machin...
2013-02-19, 1992👍, 0💬

What does it mean that a method or class is abstract?
What does it mean that a method or class is abstract? An abstract class cannot be instantiated. Only its subclasses can be instantiated. You indicate that a class is abstract with the abstract keyword like this: public abstract class Container extends Component { Abstract classes may contain abstrac...
2013-02-19, 1956👍, 0💬

What does it mean that a class or member is final?
What does it mean that a class or member is final? A final class can no longer be subclassed. Mostly this is done for security reasons with basic classes like String and Integer. It also allows the compiler to make some optimizations, and makes thread safety a little easier to achieve. Methods may b...
2013-02-18, 2010👍, 0💬

Why are there no global variables in Java?
Why are there no global variables in Java? Global variables are considered bad form for a variety of reasons: · Adding state variables breaks referential transparency (you no longer can understand a statement or expression on its own: you need to understand it in the context of the settings of the ...
2013-02-18, 1937👍, 0💬

Why can't I say just abs() or sin() instead of Math.abs() and Math.sin()?
Why can't I say just abs() or sin() instead of Math.abs() and Math.sin()? The import statement does not bring methods into your local name space. It lets you abbreviate class names, but not get rid of them altogether. That's just the way it works, you'll get used to it. It's really a lot safer this ...
2013-02-15, 1904👍, 0💬

Whats the difference between notify() and notifyAll()?
Whats the difference between notify() and notifyAll()? notify() is used to unblock one waiting thread; notifyAll() is used to unblock all of them. Using notify() is preferable (for efficiency) when only one blocked thread can benefit from the change (for example, when freeing a buffer back into a po...
2013-02-15, 2136👍, 0💬

Which characters may be used as the second character of an identifier,but not as the first character of an identifier?
Which characters may be used as the second character of an identifier,but not as the first character of an identifier? The digits 0 through 9 may not be used as the first character of an identifier but they may be used after the first character of an identifier.
2013-02-14, 2046👍, 0💬

Is null a keyword?
Is null a keyword? The null value is not a keyword.
2013-02-14, 1929👍, 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...
2013-02-12, 1929👍, 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.
2013-02-12, 2024👍, 0💬

What does it mean that a method or field is "static"?
What does it mean that a method or field is "static"? Static variables and methods are instantiated only once per class. In other words they are class variables, not instance variables. If you change the value of a static variable in a particular object, the value of that variable changes for all in...
2013-02-11, 1916👍, 0💬

Why isn't there operator overloading?
Why isn't there operator overloading? Because C++ has proven by example that operator overloading makes code almost impossible to maintain. In fact there very nearly wasn't even method overloading in Java, but it was thought that this was too useful for some very basic methods like print(). Note tha...
2013-02-11, 1932👍, 0💬

Why isn't there operator overloading?
Why isn't there operator overloading? Because C++ has proven by example that operator overloading makes code almost impossible to maintain. In fact there very nearly wasn't even method overloading in Java, but it was thought that this was too useful for some very basic methods like print(). Note tha...
2013-02-08, 1880👍, 0💬

What are some alternatives to inheritance?
What are some alternatives to inheritance? Delegation is an alternative to inheritance. Delegation means that you include an instance of another class as an instance variable, and forward messages to the instance. It is often safer than inheritance because it forces you to think about each message y...
2013-02-08, 2039👍, 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, 2386👍, 0💬

I made my class Cloneable but I still get 'Can't access protected method clone. Why?
I made my class Cloneable but I still get 'Can't access protected method clone. Why? Yeah, some of the Java books, in particular "The Java Programming Language", imply that all you have to do in order to have your class support clone() is implement the Cloneable interface. Not so. Perhaps that was t...
2013-02-07, 1936👍, 0💬

What is a local, member and a class variable?
What is a local, member and a class variable? Variables declared within a method are "local" variables. Variables declared within the class i.e not within any methods are "member" variables (global variables). Variables declared within the class i.e not within any methods and are defined as "static"...
2013-02-06, 1922👍, 0💬

What modifiers are allowed for methods in an Interface?
What modifiers are allowed for methods in an Interface? Only public and abstract modifiers are allowed for methods in interfaces.
2013-02-06, 1991👍, 0💬

What is Externalizable?
What is Externalizable? Externalizable is an Interface that extends Serializable Interface. And sends data into Streams in Compressed Format. It has two methods, writeExternal(ObjectOuput out) and readExternal(ObjectInput in)
2013-02-05, 1947👍, 0💬

Can we define private and protected modifiers for variables in interfaces?
Can we define private and protected modifiers for variables in interfaces? Yes.
2013-02-05, 1951👍, 0💬

Can an Interface have an inner class?
Can an Interface have an inner class? Yes public interface abc { static int i=0; void dd(); class a1 { a1() { int j; System.out.println("in interfia"); }; public static void main(String a1[]) { System.out.println("in interfia"); } } }
2013-02-04, 1938👍, 0💬

<< < 4 5 6 7 8 9 10 11 12 13 14 > >>   Sort: Rank