Mahesh Parahar has Published 191 Articles

Difference between Traditional Collections and Concurrent Collections in java

Mahesh Parahar

Mahesh Parahar

Updated on 17-Jun-2025 16:29:14

1K+ Views

In Java, as we know, Collections are one of the most important concepts that make Java a powerful language in itself. It's the support of collections in Java that makes it support any type of data in a convenient and efficient way, along with possible CRUD operations over them. But ... Read More

Difference between Constructors and Methods in Java

Mahesh Parahar

Mahesh Parahar

Updated on 16-Apr-2025 15:54:49

20K+ Views

Constructors are special methods used to initialize objects, whereas methods are used to execute certain statements. Constructors and methods are both blocks of code inside a class, but they have different purposes. In this article we will learn about the main differences between a constructor and a method. What ... Read More

Difference between Static SQL and Dynamic SQL

Mahesh Parahar

Mahesh Parahar

Updated on 23-Dec-2024 19:33:01

28K+ Views

Static SQLStatic SQL refers to those SQL statements which are fixed and can be hard coded into the application. As static sqls are fixed queries, these statements can be analyzed and optimized and do not require any specific handling for security purposes.Dynamic SQLDynamic SQL refers to those SQL statements which ... Read More

Differences between Interface and class in Java

Mahesh Parahar

Mahesh Parahar

Updated on 07-Dec-2023 11:54:40

25K+ 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

The Graph Coloring

Mahesh Parahar

Mahesh Parahar

Updated on 07-Nov-2023 05:08:44

43K+ 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

Degree of Vertex of a Graph

Mahesh Parahar

Mahesh Parahar

Updated on 03-Nov-2023 13:39:03

43K+ 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

Difference between Linux and Unix

Mahesh Parahar

Mahesh Parahar

Updated on 31-Oct-2023 03:53:47

19K+ Views

LinuxLinux is an open source multi-tasking, multi-user operating system. It was initially developed by Linus Torvalds in 1991. Linux OS is widely used in desktops, mobiles, mainframes etc.UnixUnix is multi-tasking, multi-user operating system but is not free to use and is not open source. It was developed in 1969 by ... Read More

Cut Set and Cut Vertex of Graph

Mahesh Parahar

Mahesh Parahar

Updated on 22-Oct-2023 02:56:07

43K+ Views

Whether it is possible to traverse a graph from one vertex to another is determined by how a graph is connected. Connectivity is a basic concept in Graph Theory. Connectivity defines whether a graph is connected or disconnected.ConnectivityA graph is said to be connected if there is a path between ... Read More

How can we convert list to Set in Java?

Mahesh Parahar

Mahesh Parahar

Updated on 22-Oct-2023 02:44:35

29K+ Views

A list can be converted to a set object using Set constructor. The resultant set will eliminate any duplicate entry present in the list and will contains only the unique values.Set set = new HashSet(list);Or we can use set.addAll() method to add all the elements of the list to the ... Read More

How to copy a list to another list in Java?

Mahesh Parahar

Mahesh Parahar

Updated on 21-Oct-2023 13:59:39

28K+ Views

A List of elements can be copied to another List using multiple ways.Way #1Create a List by passing another list as a constructor argument.List copyOflist = new ArrayList(list);Create a List and use addAll() method to add all the elements of the source list.Way #2List copyOfList = new ArrayList(); copyOfList.addAll(list);Way #3Use ... Read More

1 2 3 4 5 ... 20 Next
Advertisements