Shiva Keerthi has Published 32 Articles

Java Program to Get Elements by Index from LinkedHashSet

Shiva Keerthi

Shiva Keerthi

Updated on 16-Aug-2023 09:06:36

898 Views

LinkedHashSet is a class provided by Java which Implements Set Interface. LinkedHashSet is implemented as a hash table with a linked list running through it, so it is more efficient that HashSet and also maintains orders. It is useful when you need a collection that maintains order and does not ... 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

126 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

1K+ 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 Get CPU Serial Number for Windows Machine

Shiva Keerthi

Shiva Keerthi

Updated on 16-Aug-2023 08:57:44

351 Views

CPU known as Central Processing Unit is the brain of the computer. It performs all the main operations in a computer. It is also called central processor or main processor. The CPU serial number is a unique identifier which is given to that particular CPU by the manufacturer to each ... Read More

Java Program to Get Components of a URL

Shiva Keerthi

Shiva Keerthi

Updated on 16-Aug-2023 08:53:11

557 Views

URL known as Uniform Resource Locator is a string used to specify the location of web resources like web pages, images, videos, files on the internet.URL helps to easily access them and helps to retrieve the resources from the web servers.URL is also known as Internet address or web address. ... Read More

Java Program to find the Last Index of a Particular Word in a String

Shiva Keerthi

Shiva Keerthi

Updated on 16-Aug-2023 08:46:54

164 Views

A String is a sequence of characters. In Java, a string is also an object. It is the object of the String class. The last index of a particular word in a string is nothing but the position of the last occurrence of that word in the string. The index ... Read More

Java Program to Handle Divide by Zero and Multiple Exceptions

Shiva Keerthi

Shiva Keerthi

Updated on 11-Apr-2023 14:25:59

6K+ 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 Find Sum of First N Odd numbers and Even numbers

Shiva Keerthi

Shiva Keerthi

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

2K+ 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

2K+ 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 get Size of Directory

Shiva Keerthi

Shiva Keerthi

Updated on 11-Apr-2023 14:13:56

376 Views

A group of files combined stored at a common location is known as “Directory”. A directory not only contains a group of files but also it can contain a group of other directories as well. A directory is also known as a “Folder”. Directories are a fundamental component of file ... Read More

Advertisements