- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Mahesh Parahar has Published 276 Articles
Mahesh Parahar
4K+ Views
In Java, abstraction is achieved using Abstract classes and interfaces. Both contains abstract methods which a child class or implementing class has to implement. Following are the important differences between abstract class and an interface. Sr. No. Key Abstract Class Interface 1 Supported Methods Abstract class can have both an abstract as well as concrete methods. Interface can ... Read More
Mahesh Parahar
8K+ Views
In Java, abstraction is achieved using Abstract classes and interfaces. An abstract class contains abstract methods which a child class. Following are the important differences between abstract class and a concrete class. Sr. No. Key Abstract Class Concrete Class 1 Supported Methods Abstract class can have both an abstract as well as concrete methods. A concrete class can ... Read More
Mahesh Parahar
18K+ Views
Constructors are special methods used to initialize objects whereas methods are used to execute certain statements. Following are the important differences between Constructors and Methods. Sr. No. Key Constructors Methods 1 Purpose Constructor is used to create and initialize an Object. Method is used to execute certain statements. 2 Invocation A constructor is invoked implicitly by the System. A method is to ... Read More
Mahesh Parahar
18K+ Views
Class A class is a blueprint from which individual objects are created. A class can contain any of the following variable types. Local Variables − Variables defined inside methods, constructors or blocks are called local variables. The variable will be declared and initialized within the method and the variable will be destroyed ... Read More
Mahesh Parahar
22K+ Views
Both ArrayList and LinkedList are implementation of List interface in Java. Both classes are non-synchronized. But there are certain differences as well. Following are the important differences between ArrayList and LinkedList method. Sr. No. Key ArrayList LinkedList 1 Internal Implementation ArrayList internally uses a dynamic array to store its elements. LinkedList uses Doubly Linked List to store its elements. 2 Manipulation ArrayList ... Read More
Mahesh Parahar
11K+ Views
String buffer and StringBuilder both are mutable classes which can be used to do operation on string objects such as reverse of string, concating string and etc. We can modify string without creating a new object of the string. A string buffer is thread-safe whereas string builder is not thread-safe. Therefore, ... Read More
Mahesh Parahar
2K+ Views
List and Set both interface belongs to the Collection framework. Both interfaces extend the Collection interface. They both are used to store a collection of objects as a single unit. Before jdk1.2, we used to use Arrays, Vectors, and Hashtable for grouping objects as a single unit. Sr. No. Key List Set 1 Positional Access The list provides ... Read More
Mahesh Parahar
34K+ Views
Graph coloring is the procedure of assignment of colors to each vertex of a graph G such that no adjacent vertices get same color. The objective is to minimize the number of colors while coloring a graph. The smallest number of colors required to color a graph G is called ... Read More
Mahesh Parahar
27K+ Views
It is the number of vertices adjacent to a vertex V. Notation − deg(V). In a simple graph with n number of vertices, the degree of any vertices is − deg(v) = n – 1 ∀ v ∈ G A vertex can form an edge with all other vertices except ... Read More
Mahesh Parahar
24K+ Views
We can use add() methods of List to add elements to the list.1. Use add() method without index.boolean add(E e)Appends the specified element to the end of this list (optional operation).Parameterse − Element to be appended to this list.ReturnsTrue (as specified by Collection.add(E)).ThrowsUnsupportedOperationException − If the add operation is not ... Read More