Class and Interface both are used to create new reference types. A class is a collection of fields and methods that operate on fields. An interface has fully abstract methods i.e. methods with nobody. An interface is syntactically similar to the class but there is a major difference between class and interface that is a class can be instantiated, but an interface can never be instantiated. So let us learn some more difference between a class and interface with the help of a comparison chart … [Read more...]
Difference Between List and Set in Java
List and Set interface extends Collection. Both of them maintains the collection of elements or objects. But, the major difference that distinguishes them from each other is List is a collection of ordered element, the elements are added or remove or accessed with the help of an index variable. On the other hand, Set is a collection of objects where the collection does not allow duplicate elements in it. Let us study some more differences between List and Set interfaces with the help of … [Read more...]
Difference Between HashMap and Hashtable in Java
The HashMap and Hashtable, both are used to represent a group of objects that are represented in <Key, Value> pair. Each <Key, Value> pair is called Entry object. The collection of Entries is referred by the object of HashMap and Hashtable. Keys in a collection must be unique or distinctive. The difference between HashMap and Hashtable is that HashMap particularly implements the Map interface whereas, the Hashtable extends the Dictionary class (legacy class) which is reengineered … [Read more...]
Difference Between ArrayList and Vector in Java
ArrayList and Vector both are the classes under Collection Framework hierarchy. ArrayList and Vector, both are used to create a dynamic array of objects where the array can grow in size as and when required. There are two basic differences that distinguish ArrayList and Vector is that Vector belongs to Legacy classes that were later reengineered to support the collection classes whereas, an ArrayList is a standard collection class. Another important difference is that ArrayList is … [Read more...]
Difference Between dispose() and finalize() in C#
Methods dispose() and finalize() are the methods of C# which are invoked to free the unmanaged resources held by an object. The dispose() method is defined inside the interface IDisposable whereas, the method finalize() is defined inside the class object. The main difference between dispose() and finalize() is that the method dispose() has to be explicitly invoked by the user whereas, the method finalize() is invoked by the garbage collector, just before the object is destroyed. Let us study … [Read more...]
Difference Between new and malloc( )
The new and malloc() both are used to dynamically allocate the memory. Though, new and malloc() are different in many contexts. The primary difference between new and malloc() is that new is the operator, used as a construct. On the other hand, the malloc() is a standard library function, used to allocate memory at runtime. The other differences between them are discussed below in the comparison chart: Content: new Vs malloc() Comparison Chart Definition Key Differences … [Read more...]
Difference Between int and long
The data types int and long are among the two integer data types described in Java. In Java, the types int and long are signed, +ve and -ve values. Java does not support unsigned int and long types. The fundamental difference between an int and long data type is the width of each type. The datatype int has the width of 32-bit for the variable of int type. On the other hand, the data type long has the width of 64-bit for the variable of long type. The comparison chart below shows some other … [Read more...]
Difference Between Float and Double
Float and Double both are the data types under Floating-point type. The Floating-point numbers are the real numbers that have a fractional component in it. The primary difference between float and double is that the float type has 32-bit storage. On the other hand, the double type has 64-bit storage. There are some other differences between float and double that are discussed in the comparison chart given below. Content: Float Vs Double Comparison Chart Definition Key … [Read more...]
Difference Between Process and Thread in Java
Java provides the concept of multitasking, which allows more than two processes to run concurrently, and allows more than two threads to run concurrently. The main difference between process and thread is that a process is a program in execution whereas, a thread is part of that running process. Process and thread share a relationship where a process provides an environment for the execution of the thread. A process can contain multiple threads. There are some other differences between … [Read more...]
Difference Between Applet and Servlet in Java
Applet and servlet are the small Java programs or applications. But, both get processed in a different environment. The basic difference between an applet and a servlet is that an applet is executed on the client-side whereas, a servlet is executed on the server-side. Both of them differ in many contexts, let us study the difference between applet and servlet with the help of comparison chart. Content: Applet Vs Servlet in Java Comparison Chart Definition Key Differences … [Read more...]
- « Previous Page
- 1
- …
- 5
- 6
- 7
- 8
- 9
- …
- 12
- Next Page »