Alshifa Hasnain has Published 283 Articles

Difference between continue and break statements in Java

Alshifa Hasnain

Alshifa Hasnain

Updated on 21-Mar-2025 19:08:32

9K+ Views

As we know in programming execution of code is done line by line. Now in order to alter this flow Java provides two statements break and continue which are mainly used to skip some specific code at specific lines. Difference Table Following are the important differences between continue and break ... Read More

How to declare a static String array in Java

Alshifa Hasnain

Alshifa Hasnain

Updated on 20-Mar-2025 18:18:57

1K+ Views

In this article, we will learn the declaration of static Strings array in Java. Arrays can be used to store multiple values in one variable. Static array has a specific size which cannot be increased in the later part of the program after creation. What is a Static String Array? ... Read More

Java program to merge two files into a third file

Alshifa Hasnain

Alshifa Hasnain

Updated on 20-Mar-2025 18:18:43

4K+ Views

In this article, we will learn to merge two files into a third file in Java. Combining the contents of two files into a third file is a typical operation in file handling, frequently needed to aggregate data. Java offers efficient facilities such as BufferedReader and PrintWriter to accomplish this ... Read More

break, continue and label in Java loop

Alshifa Hasnain

Alshifa Hasnain

Updated on 20-Mar-2025 18:18:14

4K+ Views

In this article. we will learn about break, continue, and label in Java loop. There are cases when you would want to manage the flow of your loop, that is, skip some iterations or terminate the loop altogether. This is where break, continue, and label statements are used. Break Statement A ... Read More

Non-generic Vs Generic Collection in Java

Alshifa Hasnain

Alshifa Hasnain

Updated on 19-Mar-2025 18:53:35

2K+ Views

In this article, we will learn about the collections in Java. The collections are used to store and manipulate groups of objects. Java collections can be broadly classified into two types − Non-generic Collections (Before Java 5) Generic Collections (Introduced in ... Read More

Parallel Data Processing in Java

Alshifa Hasnain

Alshifa Hasnain

Updated on 19-Mar-2025 18:53:20

1K+ Views

In this article, we will learn about Parallel Data Processing in Java. Parallel processing of data is important to increase performance, particularly for large amounts of data. Java has its own built-in ways to accomplish things in the background, fully using multi-core processors. Different Approaches The following are the two ... Read More

Multidimensional Collections in Java

Alshifa Hasnain

Alshifa Hasnain

Updated on 19-Mar-2025 18:52:59

3K+ Views

In this article, we will learn about multidimensional collections in Java. These collections offer dynamic resizing, flexible data storage, and better memory management compared to traditional arrays. What are Multidimensional collections? Multidimensional collections are also known as Nested collections. It is a group of objects wherein every group has any ... Read More

C++ Program to Create Custom Exception

Alshifa Hasnain

Alshifa Hasnain

Updated on 18-Mar-2025 17:55:41

4K+ Views

In this article, we learn to create custom-made, user−defined exceptions in C++. Exceptions are a core concept of C++. They occur when an unwanted or impossible operation occurs during execution. Handling these unwanted or impossible operations is known as exception handling in C++. What is Exception Handling? Exception handling is ... Read More

Initialize an ArrayList in Java

Alshifa Hasnain

Alshifa Hasnain

Updated on 18-Mar-2025 17:55:13

1K+ Views

In this article, we will learn to initialize an ArrayList in Java. The ArrayList class extends AbstractList and implements the List interface. ArrayList supports dynamic arrays that can grow as needed. Array lists are created with an initial size. When this size is exceeded, the collection is automatically enlarged. When ... Read More

Can we create a program without a main method in Java?

Alshifa Hasnain

Alshifa Hasnain

Updated on 18-Mar-2025 11:15:51

2K+ Views

Java is a statically typed, object-oriented programming language that needs a main method as an entry point for running. But it is possible to develop Java programs without a main method under certain conditions. Different Approaches The following are the different approaches for creating a program without a main method ... Read More

Advertisements