Aishwarya Naglot has Published 180 Articles

How to extract an HTML tag from a String using regex in Java?

Aishwarya Naglot

Aishwarya Naglot

Updated on 01-Sep-2025 12:36:05

3K+ Views

In this article, we will see how to extract an HTML tag from a string using regex in Java. We can achieve this in multiple ways, but if we use regex, it will be better than others and also give us fast performance. What is Regex? Regex is a sequence ... Read More

What are the rules of exception handling with respect to method overriding in java?

Aishwarya Naglot

Aishwarya Naglot

Updated on 01-Sep-2025 12:24:13

728 Views

While a superclass method throws an exception when overriding it, you need to follow certain rules. We will be discussing these rules in this chapter. What is Exception Handling in Java? Exception handling is a mechanism to handle errors in the program. For example, if a program tries to divide ... Read More

How do we split a string on a fixed character sequence in java?

Aishwarya Naglot

Aishwarya Naglot

Updated on 28-Aug-2025 10:31:48

653 Views

In this article, we will learn how to split a string on a fixed character sequence in Java. We have multiple ways to split a string in Java. Some of them are as follows: Using the split() method of the String class. Using the substring() method of the String ... Read More

How do we create a string from the contents of a file in java?

Aishwarya Naglot

Aishwarya Naglot

Updated on 28-Aug-2025 10:30:07

243 Views

We can use the method below to read the contents of a file in Java: Using the java.util.Scanner class. Using the java.io.BufferedReader class. Using the java.nio.file.Files class. Using the Scanner class In Java, you can read the contents of a file in several ways. One way is to ... Read More

How do we extract all the words start with a vowel and length equal to n in java?

Aishwarya Naglot

Aishwarya Naglot

Updated on 28-Aug-2025 09:38:37

1K+ Views

In this article, we will learn to extract all the words that start with a vowel and have a length equal to n from a given text file or string in Java. We can solve this problem using the following ways: Using the split() method of the String class. ... Read More

Java program to compare elements in a collection

Aishwarya Naglot

Aishwarya Naglot

Updated on 26-Aug-2025 17:18:53

797 Views

In Java, the Collection framework provides an architecture to store and manipulate a group of objects. Collections support operations such as searching, sorting, insertion, manipulation, and deletion. In this article, we will learn how to compare elements in a collection in Java using different approaches. Before learning about the ... Read More

Java program to convert a list of string to comma separated string

Aishwarya Naglot

Aishwarya Naglot

Updated on 26-Aug-2025 16:44:22

793 Views

A list is a collection in Java which is used for storing group of elements. It is an ordered collection which also allows to store duplicate elements. A String is a sequence of characters which is used for representing text in Java. Here, in this article, we are given a ... Read More

Java Program to Get the Size of the Collection

Aishwarya Naglot

Aishwarya Naglot

Updated on 21-Aug-2025 12:32:32

205 Views

The Collection is a framework that provides architecture to store and manipulate the group of objects. Java Collections can achieve all the operations that you perform on a data such as searching, sorting, insertion, manipulation, and deletion. In this article we will look at how to get the size of ... Read More

Java Program to Rotate Elements of a List

Aishwarya Naglot

Aishwarya Naglot

Updated on 21-Aug-2025 12:31:09

459 Views

The List extends Collection and declares the behavior of a collection that stores a sequence of elements. The Collection is a framework that provides architecture to store and manipulate the group of objects. Java Collections can achieve all the operations that you perform on a data such as searching, sorting, ... Read More

Java Program to Access elements from a LinkedList

Aishwarya Naglot

Aishwarya Naglot

Updated on 20-Aug-2025 12:26:31

445 Views

The Linked List in a Java is a data structure that is used for storing data in linear order. It has a series of node where each node contains two parts: data and a reference to the next node in the list. The first node is called the head and ... Read More

Advertisements