<< < 2 3 4 5 6 7 8 9 10 11 12 > >>   Sort: Date

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-07-30, 2319👍, 0💬

What is the immediate superclass of the Dialog class?
What is the immediate superclass of the Dialog class? Window.
2012-10-05, 2314👍, 0💬

What is the Set interface?
What is the Set interface? The Set interface provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements.
2012-08-02, 2312👍, 0💬

How do you know if an explicit object casting is needed?
How do you know if an explicit object casting is needed? If you assign a superclass object to a variable of a subclass's data type, you need to do explicit casting. For example: Object a; Customer b; b = (Customer) a; When you assign a subclass to a variable having a supeclass type, the casting is p...
2012-08-07, 2311👍, 0💬

Is Iterator a Class or Interface? What is its use?
Is Iterator a Class or Interface? What is its use? Iterator is an interface which is used to step through the elements of a Collection.
2012-05-23, 2311👍, 0💬

Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?
Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written? Yes, it does. The FileNoFoundException is inherited from the IOException. Exception's subclasses have to be caught first.
2012-06-13, 2310👍, 0💬

What's new with the stop(), suspend() and resume() methods in JDK 1.2?
What's new with the stop(), suspend() and resume() methods in JDK 1.2? The stop(), suspend() and resume() methods have been deprecated in JDK 1.2.
2012-06-05, 2306👍, 0💬

What is the purpose of 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.
2012-06-28, 2302👍, 0💬

What is Serialization and deserialization?
What is Serialization and deserialization? Serialization is the process of writing the state of an object to a byte stream. Deserialization is the process of restoring these objects.
2012-08-09, 2298👍, 0💬

What is the preferred size of a component?
What is the preferred size of a component? The preferred size of a component is the minimum component size that will allow the component to display normally.
2012-06-06, 2297👍, 0💬

Which TextComponent method is used to set a TextComponent to the read-only state?
Which TextComponent method is used to set a TextComponent to the read-only state? setEditable()
2012-11-28, 2294👍, 0💬

Can you declare a class as private?
Can you declare a class as private? Yes, we can declare a private class as an inner class. For example, class MyPrivate { private static class MyKey { String key = "12345"; } public static void main(String[] args) { System.out.println(new MyKey().key);//prints 12345 } }
2012-08-23, 2292👍, 0💬

Can each Java object keep track of all the threads that want to exclusively access to it?
Can each Java object keep track of all the threads that want to exclusively access to it? Yes. Use Thread.currentThread() method to track the accessing thread.
2012-06-13, 2291👍, 0💬

What is multi-threading?
What is multi-threading? Multi-threading means various threads that run in a system.
2012-06-08, 2291👍, 0💬

Why do we need to use getSystemResource() and getSystemResources() method to load resources?
Why do we need to use getSystemResource() and getSystemResources() method to load resources? Because we want to look for resources strictly from the system classpath, These methods use the system ClassLoader to locate resources, which gives you stricter control of the resources used by the applicati...
2012-09-12, 2289👍, 0💬

What are synchronized methods and synchronized statements?
What are synchronized methods and synchronized statements? Synchronized methods are methods that are used to control access to a method or an object. A thread only executes a synchronized method after it has acquired the lock for the method's object or class. Synchronized statements are similar to s...
2012-06-04, 2288👍, 0💬

What is the Map interface?
What is the Map interface? The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with values.
2012-07-20, 2287👍, 0💬

How to create a thread in a program?
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.
2012-06-11, 2286👍, 0💬

If a class is located in a package, what do you need to change in the OS environment to be able to use it?
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 a directory or a jar file that contains the package directories to the CLASSPATH environment variable. Let's say a class Employee belongs to a package com.xyz.hr; and is located...
2012-05-28, 2285👍, 0💬

When should the method invokeLater()be used?
When should the method invokeLater()be used? This method is used to ensure that Swing components are updated through the event-dispatching thread.
2012-06-29, 2279👍, 0💬

Which class should you use to obtain design information about an object?
Which class should you use to obtain design information about an object? The Class class is used to obtain information about an object's design.
2012-07-23, 2274👍, 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...
2012-05-31, 2274👍, 0💬

What is the difference between the Font and FontMetrics classes?
What is the difference between the Font and FontMetrics classes? The FontMetrics class is used to define implementation-specific properties, such as ascent and descent, of a Font object
2012-07-17, 2267👍, 0💬

How many methods in Object class?
How many methods in Object class? This question is not asked to test your memory. It tests you how well you know Java. Ten in total. clone() equals() & hashcode() getClass() finalize() wait() & notify() toString()
2012-06-29, 2263👍, 0💬

<< < 2 3 4 5 6 7 8 9 10 11 12 > >>   Sort: Date