Sakhi Bhagwat has Published 5 Articles

How to Temporarily Suspend a Thread in Java?

Sakhi Bhagwat

Sakhi Bhagwat

Updated on 24-Jul-2023 16:45:39

378 Views

Threads are an important aspect of Java programs. They are also known as lightweight processes. Every program in Java has at least a main thread. They play a very important role to run multiple tasks at the same time. They run in the background and do not affect the execution ... Read More

How to Take Input from User Separated by Space in Java?

Sakhi Bhagwat

Sakhi Bhagwat

Updated on 24-Jul-2023 16:26:52

2K+ Views

Input and output are the vital components of all the programming languages. Same is the case with Java. User input is very crucial for creating dynamic and interactive applications. Usually the input is a single value but we can also take input from the user separated by space. This article ... Read More

How to Create a User-Defined Javap Tool?

Sakhi Bhagwat

Sakhi Bhagwat

Updated on 24-Jul-2023 16:17:36

84 Views

At times, we need information related to a class file. In such a case, we can use the javap tool provided by the Java Development Kit (JDK). We can get more information related to the methods, constructors, and fields present in the class. The purpose of the javap tool is ... Read More

How to Create a TreeSet with a List in Java?

Sakhi Bhagwat

Sakhi Bhagwat

Updated on 24-Jul-2023 16:11:08

350 Views

A TreeSet in Java stores unique elements in sorted order. It implements the SortedSet interface. The TreeSet interface internally uses a balanced tree called the Red-Black tree. A List in Java is a data structure that is used to store elements in the order in which they were added. We ... Read More

Find the Number of Paths of Length K in a Directed Graph

Sakhi Bhagwat

Sakhi Bhagwat

Updated on 24-Jul-2023 15:42:05

329 Views

You are given a directed and unweighted graph G and an integer K. You have to find the number of paths in the graph of length K. Here the graph is in the form of an adjacency matrix. From vertex i to j, if there exists an edge, it is ... Read More

1
Advertisements