
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 278 Articles

Krantik Chavan
602 Views
In this article, we will learn how to sort a stream of strings using a reversed comparator in Java. Java 8 introduced the Stream API, which allows powerful operations like sorting using custom comparators. Java Comparator A Comparator is a functional interface in Java that defines custom sorting logic. It ... Read More

Krantik Chavan
340 Views
In this article, we calculate the number of minutes in a given duration using Java. The Duration class can perform time-based calculations like hours, minutes, days, etc.. and easily convert between these units. Using the toMinutes() method you will be able to get the number of minutes from a given ... Read More

Krantik Chavan
168 Views
In this article, we will learn how to create a Duration object in Java based on different time units like days, hours, milliseconds, and minutes, and then convert them into seconds. The Duration class in Java is part of the java.time package and is used to represent a duration of ... Read More

Krantik Chavan
983 Views
In this article, we will learn to disable the first item on a JComboBox using Java. This setup is useful for applications where you want to show a placeholder as the first item and prevent it from being chosen, so users must select a valid option. We will be using ... Read More

Krantik Chavan
742 Views
In this article, we will learn how to display a webpage in JEditorPane using Java. The program will load a specified webpage, and display it within a GUI window. If the connection to the webpage fails, a message will appear indicating the connection issue. This setup can be useful for ... Read More

Krantik Chavan
535 Views
In this article, we will learn how to fill elements in a long array in Java using the Arrays.fill() method. This method allows us to assign a specific long value to all elements of the array. The Arrays.fill() function is a simple way to initialize or overwrite the values in ... Read More

Krantik Chavan
694 Views
In this article, we will learn how to sort lists containing null values in Java and ensure these nulls are kept at the bottom while upper elements remain in order. This can be done using Comparator.nullsLast, which sorts the non-null elements and places all null elements at last. Problem Statement ... Read More

Krantik Chavan
736 Views
In this article, we will learn to get the reverse of an Integer array with Lambda expressions in Java. By utilizing the Arrays.sort() method along with a custom comparator defined as a lambda expression, we can efficiently reorder the elements of the array in descending order. Lambda expressions are a concise ... Read More

Krantik Chavan
989 Views
In this article, we will learn to get date for all the days of the current week using Java. We will use the java.time package to get the current date and calculate the dates for the rest of the week based on the current day. Steps to get date for all ... Read More

Krantik Chavan
784 Views
In this article, we will learn how to select all the items in a JList in Java. The program creates a simple graphical user interface with a list of sports. It uses the setSelectionInterval() method to select all items in the list. This ensures that from the first item to ... Read More