- 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
Krantik Chavan has Published 308 Articles
Krantik Chavan
486 Views
The Period instance can be obtained from a string value using the parse() method in the Period class in Java. This method requires a single parameter i.e. the string which is to be parsed. This string cannot be null. Also, it returns the Period instance obtained from the string value ... Read More
Krantik Chavan
629 Views
A Heap is a complete binary tree which is either Min Heap or Max Heap. In a Max Heap, the key at root must be maximum among all keys present in Heap. This property must be recursively true for all nodes in that Binary Tree. Min Heap is similar to ... Read More
Krantik Chavan
64 Views
An instance of a Period object can be obtained from a Temporal object using the from() method in the Period class in Java. This method requires a single parameter i.e. the TemporalAmount and it returns the Period object that is obtained.A program that demonstrates this is given as followsExample Live Demoimport ... Read More
Krantik Chavan
19K+ Views
In the selection sort technique, the list is divided into two parts. In one part all elements are sorted and in another part the items are unsorted. At first we take the maximum or minimum data from the array. After getting the data (say minimum) we place it at the ... Read More
Krantik Chavan
48 Views
An immutable copy of a Period where all the Period elements are multiplied by a value can be obtained using the method multipliedBy() in the Period class in Java. This method requires a single parameter i.e. the value which is to be multiplied and it returns the immutable copy of ... Read More
Krantik Chavan
489 Views
To check connectivity of a graph, we will try to traverse all nodes using any traversal algorithm. After completing the traversal, if there is any node, which is not visited, then the graph is not connected.For the directed graph, we will start traversing from all nodes to check connectivity. Sometimes ... Read More
Krantik Chavan
302 Views
In directed graph components are said to be strongly connected, when there is a path between each pair of vertices in one component.To solve this algorithm, firstly, DFS algorithm is used to get the finish time of each vertex, now find the finish time of the transposed graph, then the ... Read More
Krantik Chavan
425 Views
Following is the syntax to GROUP BY in a select query on positive or negative values:select *from yourTableName group by -yourColumnName;Let us first create a table:mysql> create table DemoTable (Value int); Query OK, 0 rows affected (0.60 sec)Following is the query to insert some records in the table using insert ... Read More
Krantik Chavan
92 Views
We will get seconds here based on days, hours, millis and minutes, for example, how many seconds in 10 days, seconds in 10 hours, etc.Duration for days, hours, milliseconds and minutes:Duration duration = Duration.ofDays(10); Duration duration1 = Duration.ofHours(10); Duration duration2 = Duration.ofMillis(10); Duration duration3 = Duration.ofMinutes(10);Now, get the seconds:System.out.println("Seconds in ... Read More
Krantik Chavan
177 Views
At first, set the Duration:Duration duration = Duration.ofHours(10);Now, get the number of minutes from the above Duration that has 10 hours:d1.toMinutes()Exampleimport java.time.Duration; public class Demo { public static void main(String[] args) { Duration d1 = Duration.ofDays(25); Duration d2 = Duration.ofHours(10); ... Read More