Shiva Keerthi has Published 29 Articles

Java Program to Handle Divide by Zero and Multiple Exceptions

Shiva Keerthi

Shiva Keerthi

Updated on 31-May-2024 14:07:14

10K+ Views

Exceptions are the unusual events which disrupt the normal flow of execution of a program. When an exception occurs an object called exception object is generated, which contains details of exception like name, description, state of program. In this section, we are going to write a java program to handle ... Read More

Java Program to get the Size of Collection and verify that the Collection is Empty

Shiva Keerthi

Shiva Keerthi

Updated on 16-Aug-2023 09:04:15

474 Views

Collections in Java is a framework which provides classes and interfaces to manipulate group of objects. Collections help in storing and manipulating different types of objects in java. Size of the collection tells us how many elements are present in that particular collection. Java provides various collection classes namely ArrayList, ... Read More

Java Program to Get Last Modification Date of a File

Shiva Keerthi

Shiva Keerthi

Updated on 16-Aug-2023 09:02:31

4K+ Views

Last Modification Date of a File refers to the last date on which the file data is edited. We have various functions in java to find the last modification date of a file. In this section, we will be discussing different approaches of implementing a java program to get the ... Read More

Java Program to Find Sum of First N Odd numbers and Even numbers

Shiva Keerthi

Shiva Keerthi

Updated on 11-Apr-2023 14:17:21

4K+ Views

In this article, we are going to write a java program to find the sum of first n Odd and Even numbers. A number can be divided into two categories based on whether when it is divided by ‘2’ gives remainder ‘0’ or ‘1’. Odd numbers are the numbers which ... Read More

Java Program to Get Year from Date

Shiva Keerthi

Shiva Keerthi

Updated on 11-Apr-2023 14:15:57

4K+ Views

In our day to day life, there is a huge data being generated in this real world. Among the information generated, Dates are generally used for various things such as scheduling an appointment, planning for day-to-day activities. While working with dates in programming, extracting the year from a specific date ... Read More

Java Program to Find Area of Square Using Method Overloading

Shiva Keerthi

Shiva Keerthi

Updated on 11-Apr-2023 12:47:11

2K+ Views

We can calculate the area of the square in Java using Method Overloading. “Method Overloading” is a feature in Java that allows one to write more than one method in the same class using the same method name. It will enable us to declare more than one method with the ... Read More

Java Program to find Square Root of a number using Binary Search

Shiva Keerthi

Shiva Keerthi

Updated on 10-Apr-2023 16:45:00

2K+ Views

Square Root of a number is an integer value when multiplied by itself, gives the original number. In this article, we are going to write a java program to find the square root of a number using binary search. Finding square root of a number is one of the application ... Read More

Java Program to Find G.C.D and L.C.M of Two Numbers Using Euclid's Algorithm

Shiva Keerthi

Shiva Keerthi

Updated on 10-Apr-2023 16:20:17

3K+ Views

Euclid’s Algorithm is an efficient algorithm which helps us to find G.C.D and L.C.M of two numbers. In this article, we are learning to write a Java program to find the G.C.D and L.C.M of two numbers using Euclid’s Algorithm. G.C.D. of two numbers G. C. D, known as ... Read More

Java Program to Find Chromatic Index of Cyclic Graphs

Shiva Keerthi

Shiva Keerthi

Updated on 10-Apr-2023 16:19:02

186 Views

Chromatic Index of a graph is the parameter which indicates the minimum number of colours needed to colour all the edges of graph such that no two edges sharing the common vertex have same coloured edge. In this article, we will discuss how to find the chromatic index of cyclic ... Read More

Advertisements