- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2616 Articles for Java
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
977 Views
Array is a linear data structure that is used to store a group of elements with similar datatypes. It stores data in a sequential manner. Once we create an array we can’t change its size i.e. it is of fixed length. Suppose we have a 2D array of order M x M where M is the number of rows and columns. We have to sort the specified column of the given array. In this article, we will try to find the solution to the given problem. Sorting 2D Array according to column value Sorting means rearranging the elements of a ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
212 Views
Array is a linear data structure that is used to store a group of elements with similar datatypes. It stores data in a sequential manner. Once we create an array we can’t change its size i.e. it is of fixed length. The problem statement states that for a given array we have to find the minimum product of its subset. In this article, we will try to find the solution to the given problem. Program for minimum product of subsets Example 1 Let’s try to understand the problem and possible solution through an example. For the above ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
769 Views
Spring and Struts are the two most famous Java Web Frameworks available nowadays. They serve to build web applications through Java programming language. To work with these frameworks one needs to have a strong background and understanding of Java. The features and capabilities of both frameworks make it difficult to choose one over another. This article will differentiate spring and struts from each other to figure out which is best suited for your project. Spring Framework It was developed in June 2003 by Rod Johnson and with its release, it became very famous among developers. It supports various frameworks including ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
947 Views
The Serializable interface provides the facility to serialize an object. It does not define any methods and member variables. When a class implements serializable interface it simply indicates this class and its sub-classes can be serialized. The serializable interface serves to achieve the Serialization and Deserialization of an object. In this article, we will discuss the use of Serializable Interface in Java with examples. Serialization and Deserialization in Java Serialization is a mechanism used to represent a given object into a sequence of bytes and its opposite is deserialization which represents a sequence of bytes into an object. Other ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
245 Views
The term ‘Polygon’ originated from the Greek words ‘Poly’ which means ‘many’ and ‘gon’ which means ‘angle’. A polygon is a two dimensional closed plane shape created by connecting three or more than three straight lines. For example, triangle, quadrilateral, hexagon and so forth. Although there are many ways to find the area of a polygon in this article, we will use the slicker algorithm for this purpose. Slicker Algorithm to Find Area of a Polygon Slicker Algorithm Two facts you must know, First, according to mathematical convention the y-direction points upwards are always positive. Second, according to computer ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
284 Views
Servlets are small java modules that are used on server side of a web connection to enhance the functionality of web server. All the methods and classes for creating a servlet are available in ‘javax.servlet’ and ‘javax.servlet.http’ packages. Hence, it is important to import them into your program before working with the servlet. This article will guide you step by step to getting started with your first servlet application. Before moving on it is necessary to know how servlet works. Let’s discuss it briefly. Servlets The benefits of using servlets are as follows − Just like the java ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
539 Views
When the stack ran out of space then StackOverflowError occurs. It is a runtime error indicating that JVM has run out of resources. The main reasons for this kind of error may be: Circular references, infinite Recursion or heavy application that utilizes more memory. In this article, we will discuss the above listed reasons for StackOverflowError in the simplest way possible. StackOverflowError in Java Memory Mnagement in java Before moving to the StackOverflowError it is important to know about how memory space managed by java for a particular program or application. Every interface, class, object, variable and method of a ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
1K+ Views
Sorting and searching are the basic operations we can perform on arrays. Sorting means rearranging the elements of a given list or array in ascending or descending order whereas searching means finding an element or its index in a list. Although various algorithms are available to perform these operations, in this article, we will use a few of them to sort and search an element in java. One by one we will look at them. Approach 1: Using inbuilt methods of Arrays In this section, we will discuss the following methods that helps in sorting and searching of elements in ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
421 Views
In java, StreamCorruptedException occurs when problem is found with the data being read from or written to a stream. The problem may be the data we are reading or writing is in the wrong format or contains errors. If the format of given file is not correct. When stream has been closed unexpectedly or the data has been partially overwritten. In this article, we will talk about StreamCorruptedException with examples. But before moving on it is important to understand streams and few of its method that we are going to use in examples. Program to handle StreamCorruptedException Streams Stream ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
553 Views
Suppose you have a String that contains uppercase and lowercase characters both. We have to sort this given string in case specific order means if the ith position in the given string had an uppercase letter then the newly sorted string must have uppercase letter at that position and same goes for lowercase letters. Also, both lowercase and uppercase letters will be in sorted order separately. In this article, we will try to find the solution for the given problem. First, let’s understand the given problem with an example for better understanding. Example String st = "KadbHFGtvc"; Assume ... Read More