Explore the latest Java release, Java 22, which is now in General Availability.
Search Results for: Java Classes
Converting Float ArrayList to Primitive Array in Java
Learn how to convert an ArrayList of wrapper classes into an array of primitives.
How to Use Pair With Java PriorityQueue
Learn how to use Comparators with PriorityQueues and how to change the sorting order in such queues.
Resolving Security Exception: java.security.UnrecoverableKeyException: Cannot Recover Key
Learn everything you need to know about java.security.UnrecoverableKeyException – what causes it and how to fix it.
Pass a Class as a Parameter in Java
Explore scenarios where we may need to pass a class as a parameter, enabling dynamic behavior and flexibility in our code.
Create and Run Apache JMeter Test Scripts via Java Program
Learn how to create and execute Apache JMeter test scripts programmatically using the JMeter Java API.
New Features in Java 21
Learn about the new features of Java 21, like record patterns and switch enhancements for cleaner code.
Statements Before super() in Java
Learn about the sequence of statements within Java constructors, particularly the placement of super() calls.
Opening HTML File Using Java
Whether opting for the simplicity of the Desktop class or the flexibility of ProcessBuilder, Java offers multiple ways to open HTML files programmatically.
Immutable vs Unmodifiable Collection in Java
Learn how to choose between Unmodifiable and Immutable Collections in Java.
Internet Address Resolution SPI in Java
Learn how Internet Address Resolution works in Java using the InetAddress API.
Java InputStream vs. InputStreamReader
Learn how an InputStreamReader builds on an InputStream to assist when working with streams of characters.
When to Use Setter Methods or Constructors for Setting a Variable’s Value in Java
Learn when to use setter methods or constructors for setting the value of a variable in Java.
Obtaining the Last Path Segment of a URI in Java
Explore multiple Java methods, including the URI class, Path class, FilenameUtils, and regular expressions, providing diverse approaches to extract the last path segment from a URI.
Serialization with FlatBuffers in Java
Explore the FlatBuffers library and its capabilities to serialize and deserialize complex data.
Get First n Characters in a String in Java
Learn how to efficiently extract the first n characters of a string in Java using core JDK methods and popular libraries like Apache Commons Lang and Guava.
Create JavaType From Class with Jackson
Learn how to build instances of JavaType from Class objects with the help of the Jackson library.
Simple Web Server in Java 18
Learn about Simple Web Server in Java 18 and how it works.
Solving Rod Cutting Problem in Java
Explore the Rod Cutting Problem and discuss various ways of solving it.
Mutable vs. Immutable Objects in Java
Learn more about the definitions, examples, advantages, and considerations of mutable and immutable objects in Java.