Krantik Chavan has Published 278 Articles

Java program to get the beginning and end date of the week

Krantik Chavan

Krantik Chavan

Updated on 30-Aug-2024 19:34:32

2K+ Views

In this article, we'll explore how to determine the start and end dates of a week using Java. Specifically, we'll write a program that takes a given date and calculates the Monday and Sunday of that week.  Problem Statement Write a Java program to find the beginning (Monday) and end ... Read More

Java program to get the lowest and highest value in TreeSet

Krantik Chavan

Krantik Chavan

Updated on 21-Aug-2024 00:03:22

2K+ Views

In this article, we will learn how to find the lowest and highest values in a TreeSet in Java. The TreeSet class, part of the java.util package, automatically sorts its elements in natural order. We will use the first() and last() methods of the TreeSet class to retrieve the smallest ... Read More

Java program to adjust LocalDate to last day of month with TemporalAdjusters class

Krantik Chavan

Krantik Chavan

Updated on 08-Aug-2024 17:38:19

3K+ Views

In this article, we will learn the LocalDate, Month, and TemporalAdjusters classes from java.time package. These classes are essential for handling date and time operations in Java. LocalDate represents a date without time, Month is an enumeration of the twelve months, and TemporalAdjusters provides utility methods for common date ... Read More

How to draw a rounded Rectangle on HTML Canvas?

Krantik Chavan

Krantik Chavan

Updated on 16-Dec-2021 09:57:01

3K+ Views

To draw a rectangle in HTML, use the canvas element. With canvas, use the rect() method to draw a rectangle. But, for creating a rounded rectangle, using the rect() method won’t work. We will be using the lineTo() and quadraticCurveTo() method to create a rounded rectangle.This is how you can ... Read More

Usage of CSS align-content property flex-start value

Krantik Chavan

Krantik Chavan

Updated on 04-Jul-2020 06:16:07

148 Views

Use the align-content property with value flex-start to set the flex lines in the beginning.ExampleYou can try to run the following code to implement the flex-start value −Live Demo                    .mycontainer {             display: flex; ... Read More

Arrow to the top of the tooltip with CSS

Krantik Chavan

Krantik Chavan

Updated on 02-Jul-2020 14:02:26

880 Views

Use the bottom CSS property to add arrow to the top of the tooltip.ExampleYou can try to run the following code to add a tooltip with arrow to the top:Live Demo           .mytooltip .mytext {          visibility: hidden;          width: ... Read More

CSS Transition property

Krantik Chavan

Krantik Chavan

Updated on 02-Jul-2020 09:18:48

215 Views

Use the CSS transition property to set all the four transition properties into a single line. You can try to run the following code to work with the transition property −ExampleLive Demo                    div {           ... Read More

Roll In Animation Effect with CSS

Krantik Chavan

Krantik Chavan

Updated on 29-Jun-2020 07:05:37

570 Views

To create a roll in animation effect with CSS, you can try to run the following code −ExampleLive Demo                    .animated {             background-image: url(/css/images/logo.png);             background-repeat: no-repeat;       ... Read More

Get the class name for various objects in Java

Krantik Chavan

Krantik Chavan

Updated on 29-Jun-2020 06:45:23

357 Views

The getName() method is used to get the names of the entities such as interface, class, array class, void etc. that are represented by the class objects. These names are returned in the form of a string. The getPackage() method gets the package for the given class.A program that gets ... Read More

How can we retrieve file from database using JDBC?

Krantik Chavan

Krantik Chavan

Updated on 27-Jun-2020 06:18:17

1K+ Views

The ResultSet interface provides the methods named getClob() and getCharacterStream() to retrieve Clob datatype, In which the contents of a file are typically stored.These methods accept an integer representing the index of the column (or, a String value representing the name of the column) and retrieves the value at the ... Read More

Advertisements