<< < 20 21 22 23 24 25 26 27 > >>   Sort: Date

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

Can an abstract class be final?
Can an abstract class be final? An abstract class may not be declared as final.
2013-01-17, 2220👍, 0💬

What is the purpose of the File class?
What is the purpose of the File class? The File class is used to create objects that provide access to the files and directories of a local file system.
2012-12-12, 2219👍, 0💬

You can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declar
You can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces? Sometimes. But your class may be a descendent of another class and in this case the interface is...
2013-04-14, 2218👍, 0💬

How do you enable the concurrent garbage collector on Sun's JVM?
How do you enable the concurrent garbage collector on Sun's JVM? -Xconcgc options allows us to use concurrent garbage collector (1.2.2_07+)we can also use -XX:+UseConcMarkSweepGC which is available beginning with J2SE 1.4.1.
2013-03-28, 2217👍, 0💬

What is JIT?
What is JIT? JIT stands for Just In Time compiler. It compiles java byte code to native code.
2013-03-13, 2217👍, 0💬

What is the serialization?
What is the serialization? The serialization is a kind of mechanism that makes a class or a bean persistence by having its properties or fields and state information saved and restored to and from storage.
2013-02-25, 2217👍, 0💬

What is Overriding?
What is Overriding? When a class defines a method using the same name, return type, and arguments as a method in its superclass, the method in the class overrides the method in the superclass. When the method is invoked for an object of the class, it is the new definition of the method that is calle...
2013-05-10, 2216👍, 0💬

Explain the Encapsulation principle
Explain the Encapsulation principle Encapsulation is a process of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. One way to think about encapsulation is as a protective wrapper that prevents code ...
2013-02-28, 2214👍, 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, 2214👍, 0💬

Can an Interface be final?
Can an Interface be final? yes.
2013-02-04, 2211👍, 0💬

What Checkbox method allows you to tell if a Checkbox is checked?
What Checkbox method allows you to tell if a Checkbox is checked? getState()
2012-12-31, 2211👍, 0💬

What is meant by "Abstract Interface"?
What is meant by "Abstract Interface"? First, an interface is abstract. That means you cannot have any implementation in an interface. All the methods declared in an interface are abstract methods or signatures of the methods.
2013-04-06, 2210👍, 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, 2209👍, 0💬

What is the relationship between a method's throws clause and the exceptions that can be thrown during the method's execution?
What is the relationship between a method's throws clause and the exceptions that can be thrown during the method's execution? A method's throws clause must declare any checked exceptions that are not caught within the body of the method.
2012-12-27, 2208👍, 0💬

When you serialize an object, what happens to the object references included in the object?
When you serialize an object, what happens to the object references included in the object? The serialization mechanism generates an object graph for serialization. Thus it determines whether the included object references are serializable or not. This is a recursive process. Thus when an object is ...
2013-05-22, 2207👍, 0💬

When to Use the Throughput Collector?
When to Use the Throughput Collector? Use the throughput collector when you want to improve the performance of your application with larger numbers of processors. In the default collector garbage collection is done by one thread, and therefore garbage collection adds to the serial execution time of ...
2013-03-25, 2207👍, 0💬

What is externalization? Where is it useful??
What is externalization? Where is it useful?? Use the Externalizable interface when you need complete control over your Bean's serialization (for example, when writing and reading a specific file format).
2013-03-08, 2206👍, 0💬

What modifiers may be used with a top-level class?
What modifiers may be used with a top-level class? A top-level class may be public, abstract, or final.
2013-01-25, 2204👍, 0💬

Can there be an abstract class with no abstract methods in it?
Can there be an abstract class with no abstract methods in it? yes.
2013-02-01, 2203👍, 0💬

What are ClassLoaders?
What are ClassLoaders? A class loader is an object that is responsible for loading classes. The class ClassLoader is an abstract class. Given the name of a class, a class loader should attempt to locate or generate data that constitutes a definition for the class. A typical strategy is to transform ...
2013-03-14, 2202👍, 0💬

Why Thread is faster compare to process?
Why Thread is faster compare to process? A thread is never faster than a process. If you run a thread(say there's a process which has spawned only one thread) in one JVM and a process in another and that both of them require same resources then both of them would take same time to execute. But, when...
2013-03-21, 2201👍, 0💬

What are the restrictions placed on static method ?
What are the restrictions placed on static method ? We cannot override static methods. We cannot access any object variables inside static method. Also the this reference also not available in static methods.
2013-03-12, 2200👍, 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.
2012-12-19, 2198👍, 0💬

<< < 20 21 22 23 24 25 26 27 > >>   Sort: Date