- 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)
355 Views
In Java, the two terms length and capacity are related to the storage of elements in a collection like arrays, String and ArrayList. Length refers to the number of elements that are currently stored in a given collection, whereas capacity refers to the maximum number of elements that the collection can hold. In this article, we will explore the difference between Length and Capacity in Java. Length vs Capacity in Java Length To get the length of an array we use its ‘length’ property and we can get length of a String using its built-in method ‘length()’. In the ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
469 Views
JSP stands for Java Server Pages and is used for the purpose of developing web based applications. A single JSP page consists of HTML tags for static content and JSP tags to construct dynamic content. The JSP tags start with ‘’. We save our JSP file with the extension ‘.jsp’. The getParameter() method of JSP takes an argument and retrieves data associated with it from the source and further pass it to the destination. The source could be an HTML or JSP page and the destination could be another JSP page. Syntax request.getParameter("source"); Steps of Passing data from client ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
283 Views
The modern Internet is all about the World Wide Web which holds billions of websites and resources. There are several ways to access those web-based resources by following the protocols. Java has the concept of networking that is used to establish communication between clients and those resources. But, to locate a specific resource among the millions available, we need a unique identifier. There are three components: URI, URL and URN that helps us locate a certain resource on the web. Together they serve a single purpose, but through this article, we will discuss the difference between URI, URL and URN. ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
80 Views
The modern day Internet is all about the World Wide Web which holds billions of websites and resources. There are several ways to access those web-based resources by following the protocols. Java has the concept of networking that is used to establish communication between clients and those resources. But, to locate a specific resource among the millions available, we need a unique identifier. There are three components: URI, URL and URN that helps us locate a certain resource on the web. In this article, we will point out some differences between URL and URN in Java. URL vs URN in ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
56 Views
The modern day Internet is all about the World Wide Web which holds billions of website and resources. There are several ways to access those web-based resources by following the protocols. Java has the concept of networking that is used to establish communication between clients and those resources. But, to locate a specific resource among the millions available, we need a unique identifier. There are three components: URI, URL and URN that helps us locate a certain resource on the web. This article aims to explain the difference between URI and URN in Java. URI vs URN in Java URI ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
786 Views
The debate about JavaEE and Spring is very common among Java developers. Both technologies emerged as popular frameworks for building enterprise applications using Java. Java EE is a more adaptable and distributed framework for developing big software. Spring, on the other hand, is open source and makes use of the POJO programming model to develop any type of Java application. Let’s find out more detailed differences between JavaEE and Spring through this article. JavaEE vs Spring JavaEE Java Platform Enterprise Edition, in short JavaEE is a set of specifications defined by Oracle. It is also known as J2EE. It aims ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
262 Views
To get the set view of keys from a HashMap in Java, we can use the in-built method named ‘keySet()’. Here, the HashMap is a class that is used to implement Map Interface. It stores its element in key-value pairs. The Key is an object that is used to fetch and receive value associated with it. It has access to all the methods of Map Interface, it does not have any additional methods of its own. Duplicate values are not allowed, although we can store null values and keys. Java Program to Get Set View of Keys from HashMap keySet() ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
2K+ Views
To get the synchronized Map from a Hash Map in Java, we can use an in-built method of Collection interface named ‘synchronized Map()’. Here, the Hash Map is a class that is used to implement Map Interface. It stores its element in key-value pairs. The Key is an object that is used to fetch and receive value associated with it. It has access to all the methods of Map Interface, it does not have any additional methods of its own. Duplicate values are not allowed, although we can store null values and keys. In this article, we will explore the ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
248 Views
To get the synchronized Map from a TreeMap in Java, we can use an in-built method of Collection interface called ‘synchronizedMap()’. Here, TreeMap is a class that is used to implement NavigableMap Interface. It stores the elements of the map in a tree structure. It provides an efficient alternative to store the key-value pairs in sorted order. By default, a TreeMap is not synchronized. In this article, we will explain the need for synchronization and its practical implementation through example programs. Synchronized Map from a Tree Map A Tree Map is not thread-safe which means when we implement it in ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
98 Views
ArrayList is a class of Java Collection Framework that implements List Interface. It is a linear structure that stores and accesses each object in a sequential manner. It allows the storage of duplicate values. Always remember, each class of the collection framework can hold instances of wrapper classes or custom objects. They do not work with primitives. This article aims to explain how those objects hold by an ArrayList in Java. How ArrayList holds Objects ArrayList internally uses an array to store its elements. However, the size of the array is not fixed, it can increase and decrease as per ... Read More