<< < 16 17 18 19 20 21 22 23 24 25 26 > >>   Sort: Date

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

What type of parameter passing does Java support?
What type of parameter passing does Java support? In Java the arguments are always passed by value .
2013-05-16, 2258👍, 0💬

Why do we need wrapper classes?
Why do we need wrapper classes? It is sometimes easier to deal with primitives as objects. Moreover most of the collection classes store objects and not primitive data types. And also the wrapper classes provide many utility methods also. Because of these resons we need wrapper classes. And since we...
2013-05-27, 2257👍, 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, 2256👍, 0💬

Is &&= a valid Java operator?
Is &&= a valid Java operator? No, it is not.
2012-11-29, 2256👍, 0💬

Can applets communicate with each other?
Can applets communicate with each other? At this point in time applets may communicate with other applets running in the same virtual machine. If the applets are of the same class, they can communicate via shared static variables. If the applets are of different classes, then each will need a refere...
2013-06-14, 2254👍, 0💬

What is the difference between the paint() and repaint() methods?
What is the difference between the paint() and repaint() methods? The paint() method supports painting via a Graphics object. The repaint() method is used to cause paint() to be invoked by the AWT painting thread.
2012-12-12, 2252👍, 0💬

What restrictions are placed on method overloading?
What restrictions are placed on method overloading? Two methods may not have the same name and argument list but different return types.
2013-04-01, 2250👍, 0💬

Can an object be garbage collected while it is still reachable?
Can an object be garbage collected while it is still reachable? A reachable object cannot be garbage collected. Only unreachable objects may be garbage collected..
2012-11-12, 2250👍, 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, 2249👍, 0💬

How are the elements of a GridLayout organized?
How are the elements of a GridLayout organized? The elements of a GridBad layout are of equal size and are laid out using the squares of a grid.
2013-01-01, 2249👍, 0💬

What is the result in program?
What is the result in program? public class test { public static void main(String [] args) { int x = 3; int y = 1; if (x = y) System.out.println("Not equal"); else System.out.println("Equal"); } } What is the result? A. The output is “Equal” B. The output in “Not Equal” C. An error at "...
2013-03-05, 2246👍, 0💬

How to make a class or a bean serializable?
How to make a class or a bean serializable? By implementing either the java.io.Serializable interface, or the java.io.Externalizable interface. As long as one class in a class's inheritance hierarchy implements Serializable or Externalizable, that class is serializable.
2013-04-01, 2244👍, 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, 2244👍, 0💬

What is the purpose of a statement block?
What is the purpose of a statement block? A statement block is used to organize a sequence of statements as a single statement group.
2013-01-24, 2243👍, 0💬

What happens when you add a double value to a String?
What happens when you add a double value to a String? The result is a String object.
2013-01-08, 2243👍, 0💬

What is an abstract class?
What is an abstract class? Abstract class must be extended/subclassed (to be useful). It serves as a template. A class that is abstract may not be instantiated (ie, you may not call its constructor), abstract class may contain static data. Any class with an abstract method is automatically abstract ...
2013-04-30, 2242👍, 0💬

What method must be implemented by all threads?
What method must be implemented by all threads? All tasks must implement the run() method, whether they are a subclass of Thread or implement the Runnable interface.
2013-01-29, 2242👍, 0💬

How can one prove that the array is not null but empty using one line of code?
How can one prove that the array is not null but empty using one line of code? Print args.length. It will print 0. That means it is empty. But if it would have been null then it would have thrown a NullPointerException on attempting to print args.length.
2013-05-07, 2241👍, 0💬

What is the difference between error and an exception?
What is the difference between error and an exception? An error is an irrecoverable condition occurring at runtime. Such as OutOfMemory error. These JVM errors and you can not repair them at runtime. While exceptions are conditions that occur because of bad input etc. e.g. FileNotFoundException will...
2013-05-29, 2240👍, 0💬

What are checked exceptions?
What are checked exceptions? Checked exception are those which the Java compiler forces you to catch. e.g. IOException are checked Exceptions.
2013-05-28, 2240👍, 0💬

When is the finally clause of a try-catch-finally statement executed?
When is the finally clause of a try-catch-finally statement executed? The finally clause of the try-catch-finally statement is always executed unless the thread of execution terminates or an exception occurs within the execution of the finally clause.
2012-12-17, 2240👍, 0💬

What is casting?
What is casting? There are two types of casting, casting between primitive numeric types and casting between object references. Casting between numeric types is used to convert larger values, such as double values, to smaller values, such as byte values. Casting between object references is used to ...
2012-12-20, 2239👍, 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...
2013-01-24, 2238👍, 0💬

<< < 16 17 18 19 20 21 22 23 24 25 26 > >>   Sort: Date