<< < 1 2 3 4 5 6 7 8 9 10 > >>   Sort: Rank

What is static in java?
What is static in java? Static means one per class, not one for each object no matter how many instance of a class might exist. This means that you can use them without creating an instance of a class.Static methods are implicitly final, because overriding is done based on the type of the object, an...
2013-05-01, 1807👍, 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, 1803👍, 0💬

State the significance of public, private, protected, default modifiers both singly and in combination and state the effect of
State the significance of public, private, protected, default modifiers both singly and in combination and state the effect of package relationships on declared items qualified by these modifiers. public : Public class is visible in other packages, field is visible everywhere (class must be public t...
2013-04-30, 1812👍, 0💬

What is an Iterator?
What is an Iterator? Some of the collection classes provide traversal of their contents via a java.util.Iterator interface. This interface allows you to walk through a collection of objects, operating on each object in turn. Remember when using Iterators that they contain a snapshot of the collectio...
2013-04-29, 1774👍, 0💬

What is the difference between a constructor and a method?
What is the difference between a constructor and a method? A constructor is a member function of a class that is used to create objects of that class. It has the same name as the class itself, has no return type, and is invoked using the new operator. A method is an ordinary member function of a cla...
2013-04-29, 1723👍, 0💬

Difference between Swing and Awt?
Difference between Swing and Awt? AWT are heavy-weight componenets. Swings are light-weight components. Hence swing works faster than AWT.
2013-04-26, 1755👍, 0💬

Difference between Vector and ArrayList?
Difference between Vector and ArrayList? Vector is synchronized whereas arraylist is not.
2013-04-26, 1736👍, 0💬

Difference between HashMap and HashTable?
Difference between HashMap and HashTable? The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. (HashMap allows null values as key and value whereas Hashtable doesnt allow). HashMap does not guarantee that the order of the map will remain constant ...
2013-04-25, 1755👍, 0💬

What is HashMap and Map?
What is HashMap and Map? Map is Interface and Hashmap is class that implements that.
2013-04-25, 1779👍, 0💬

What are pass by reference and passby value?
What are pass by reference and passby value? Pass By Reference means the passing the address itself rather than passing the value. Passby Value means passing a copy of the value to be passed.
2013-04-24, 1833👍, 0💬

Explain different way of using thread?
Explain different way of using thread? The thread could be implemented by using runnable interface or by inheriting from the Thread class. The former is more advantageous, 'cause when you are going for multiple inheritance..the only interface can help.
2013-04-24, 1814👍, 0💬

Describe synchronization in respect to multithreading.
Describe synchronization in respect to multithreading. With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchonization, it is possible for one thread to modify a shared variable while another thread is in the pro...
2013-04-23, 1831👍, 0💬

What is the purpose of garbage collection in Java, and when is it used?
What is the purpose of garbage collection in Java, and when is it used? The purpose of garbage collection is to identify and discard objects that are no longer needed by a program so that their resources can be reclaimed and reused. A Java object is subject to garbage collection when it becomes unre...
2013-04-23, 1791👍, 0💬

What is the difference between an Interface and an Abstract class?
What is the difference between an Interface and an Abstract class? An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract. An interface ...
2013-04-22, 1747👍, 0💬

What access level do you need to specify in the class declaration to ensure that only classes from the same directory can access
What access level do you need to specify in the class declaration to ensure that only classes from the same directory can access it? You do not need to specify any access level, and Java will use a default package access level.
2013-04-22, 2722👍, 0💬

There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java techniqu
There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java technique would you use to implement it? If these classes are threads I'd consider notify() or notifyAll(). For regular classes you can use the Observer interface.
2013-04-19, 1891👍, 0💬

How can you minimize the need of garbage collection and make the memory use more effective?
How can you minimize the need of garbage collection and make the memory use more effective? Use object pooling and weak object references.
2013-04-19, 2045👍, 0💬

How would you make a copy of an entire Java object with its state?
How would you make a copy of an entire Java object with its state? Have this class implement Cloneable interface and call its method clone().
2013-04-16, 2018👍, 0💬

You are planning to do an indexed search in a list of objects. Which of the two Java collections should you use: ArrayList or Li
You are planning to do an indexed search in a list of objects. Which of the two Java collections should you use: ArrayList or LinkedList? ArrayList
2013-04-16, 1841👍, 0💬

If you're overriding the method equals() of an object, which other method you might also consider?
If you're overriding the method equals() of an object, which other method you might also consider? hashCode()
2013-04-15, 1731👍, 0💬

What comes to mind when someone mentions a shallow copy in Java?
What comes to mind when someone mentions a shallow copy in Java? Object cloning.
2013-04-15, 2060👍, 0💬

What comes to mind when you hear about a young generation in Java?
What comes to mind when you hear about a young generation in Java? Garbage collection.
2013-04-14, 1885👍, 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, 1766👍, 0💬

What's the difference between a queue and a stack?
What's the difference between a queue and a stack? Stacks works by last-in-first-out rule (LIFO), while queues use the FIFO rule
2013-04-12, 1851👍, 0💬

<< < 1 2 3 4 5 6 7 8 9 10 > >>   Sort: Rank