<< < 35 36 37 38 39 40 41 42 43 44 45 > >>   Sort: Rank

Difference between Vector and ArrayList?
Difference between Vector and ArrayList? Vector is synchronized whereas arraylist is not.
2013-04-26, 2264👍, 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, 2262👍, 0💬

What is HashMap and Map?
What is HashMap and Map? Map is Interface and Hashmap is class that implements that.
2013-04-25, 2243👍, 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, 2408👍, 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, 2332👍, 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, 2348👍, 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, 2327👍, 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, 2328👍, 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, 3330👍, 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, 2478👍, 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, 2527👍, 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, 2496👍, 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, 2440👍, 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, 2159👍, 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, 2607👍, 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, 2449👍, 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, 2229👍, 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, 2368👍, 0💬

Which Container method is used to cause a container to be laid out and redisplayed?
Which Container method is used to cause a container to be laid out and redisplayed? validate()
2013-04-12, 2434👍, 0💬

Which class is the superclass for every class.
Which class is the superclass for every class. Object.
2013-04-11, 2326👍, 0💬

Is sizeof a keyword?
Is sizeof a keyword? The sizeof operator is not a keyword in Java.
2013-04-11, 2304👍, 0💬

What is the List interface?
What is the List interface? The List interface provides support for ordered collections of objects.
2013-04-10, 2422👍, 0💬

What is the Collections API?
What is the Collections API? The Collections API is a set of classes and interfaces that support operations on collections of objects.
2013-04-10, 2342👍, 0💬

What state does a thread enter when it terminates its processing?
What state does a thread enter when it terminates its processing? When a thread terminates its processing, it enters the dead state.
2013-04-09, 2342👍, 0💬

<< < 35 36 37 38 39 40 41 42 43 44 45 > >>   Sort: Rank