The Baeldung logo
  • The Baeldung Logo
  • Start Here
  • Courses ▼▲
    • REST with Spring

      The canonical reference for building a production grade API with Spring

    • Learn Spring Security ▼▲

      THE unique Spring Security education if you’re working with Java today

      • Learn Spring Security Core

        Focus on the Core of Spring Security 5

      • Learn Spring Security OAuth

        Focus on the new OAuth2 stack in Spring Security 5

    • Learn Spring

      From no experience to actually building stuff​

    • Learn Spring Data JPA

      The full guide to persistence with Spring Data JPA

  • Guides ▼▲
    • Persistence

      The Persistence with Spring guides

    • REST

      The guides on building REST APIs with Spring

    • Security

      The Spring Security guides

  • About ▼▲
    • Full Archive

      The high level overview of all the articles on the site.

    • Baeldung Ebooks

      Discover all of our eBooks

    • About Baeldung

      About Baeldung.

Java

Java is the popular programming language that originated in 1995. Today, the Java ecosystem includes a very large number of specifications, libraries, frameworks, tools, as well as a thriving community. Take a dive through our collection of Java tutorials that cover a wide array of Java-related topics.

  • Core Java (242)
  • Java String (164)
  • Java IO (92)
  • Java Streams (80)
  • Java List (68)
  • JVM (68)
  • Java Map (66)
  • Java Array (60)
  • Exception (52)
  • Java Dates (50)
  • Java 8 (40)
  • Pattern (36)
  • Math (35)
  • Java Set (26)
  • Java 9 (25)
  • Java NIO (24)
  • Regex (23)
  • Reflection (22)
  • Java Interfaces (19)

>> Difference Between parallelStream() and stream().parallel() in Java

>> How to Determine Date of the First Day of the Week Using LocalDate in Java

>> Difference Between Javac and the Eclipse Compiler

>> Get the Desktop Path in Java

>> Can Stream.collect() Return the null Value?

>> Moving Items Around in an Arraylist

>> Handle Duplicate Keys When Producing Map Using Java Stream

>> Custom Constructor in Java Records

>> Introduction to Interface Driven Development (IDD)

>> Pipeline Design Pattern in Java

>> Implementing toString() on enums in Java

>> Different Ways to Create an Object in Java

>> Managing Multiple JDK Installations With jEnv

>> Guide to Java Project Panama

>> Download a Webpage in Java

>> Copying All Keys and Values From One Hashmap Onto Another Without Replacing Existing Keys and Values

>> Finding All Duplicates in a List in Java

>> Introduction to Roaring Bitmap

>> VarArgs vs Array Input Parameters in Java

>> Migrate From Java 8 to Java 17

>> Combining Two Lists Into a Map in Java

>> Mapping an Array of Integers to Strings Using Java Streams

>> Thread.sleep() vs Awaitility.await()

>> javax vs. java Package

>> Difference Between Class.forName() and Class.forName().newInstance()

>> Spring Data Repositories – Collections vs. Stream

>> Check if Object Is an Array in Java

>> Java HttpClient Connection Management

>> Record vs. Final Class in Java

>> Find the First Embedded Occurrence of an Integer in a Java String

>> Convert Hex to RGB Using Java

>> Callback Functions in Java

>> Understanding the Difference Between Stream.of() and IntStream.range()

>> Java Team Lead with Spring Experience (Remote) (Part Time)

>> Reading PDF File Using Java

>> Return Absolute Difference of Two Integers in Java

>> Initialize an ArrayList with Zeroes or Null in Java

>> Memory Types in JVM

>> Determine if a Class Implements an Interface in Java

>> Stream to Iterable in Java

>> Generate Unit Test Data in Java Using Instancio

>> Check if an Integer Value is null or Zero in Java

>> Comparing a String to an Enum Value in Java

>> Structured Concurrency in Java 19

>> Multiply a BigDecimal by an Integer in Java

>> Java List Interface

>> Check if Command-Line Arguments Are Null in Java

>> Convert byte[] to MultipartFile in Java

>> Fix the IllegalArgumentException: No enum const class

>> Converting a Number from One Base to Another in Java

>> The JVM Run-Time Data Areas

>> Convert an ArrayList of Object to an ArrayList of String Elements

>> Check If All the Variables of an Object Are Null

>> Compiling and Executing Code From a String in Java

>> Batch Processing of Stream Data in Java

>> Lambda Expression vs. Anonymous Inner Class

>> Storing Data Triple in a List in Java

>> Monads in Java

>> Case-Insensitive Searching in ArrayList

>> Class Methods vs Instance Methods in Java

>> RESTful Microservices With RestExpress

>> Lightweight Logging With tinylog 2

>> Quick Guide to Sentry

>> Record Patterns in Java 19

>> Getting Class Type From a String in Java

>> PrintStream vs PrintWriter in Java

>> Converting a String Array Into an int Array in Java

>> Comparing Two JAR Files in Java

>> Extracting JAR to a Specified Directory

>> Using Watermarks with iText in Java

>> Convert a List of Integers to a List of Strings

>> Check JWT Expiry Without Throwing Exceptions

>> Reading and Writing With a ConcurrentHashMap

>> When to Use Callable and Supplier in Java

>> Guide to Splitting a String by Whitespace in Java

>> Sorting a HashSet in Java

>> Extract Values using AssertJ in Java

>> Convert Between int and char in Java

>> Alternatives for instanceof Operator in Java

>> Running Multiple Thread Groups in JMeter

>> Convert Anonymous Class into Lambda in Java

>> Type Parameter vs Wildcard in Java Generics

>> Reversing a Stack in Java

>> Functors in Java

>> Java Generics PECS – Producer Extends Consumer Super

>> Guide to Java PriorityQueue

>> Errors and Exceptions in Java

>> String Interpolation in Java

>> Difference Between Map.ofEntries() and Map.of()

>> Choosing the Right Java Collection

>> How to Serialize a Singleton in Java

>> Convert Between LocalDateTime and ZonedDateTime

>> Uses for Optional in Java

>> Strong, Weak, Soft, and Phantom References in Java

>> Find the First Non Repeating Character in a String in Java

>> Calling JMX MBean Method From a Shell Script

>> Java Course Team Lead with Spring Experience (Remote) (Part Time) (not open)

>> Expression Types in Thymeleaf

>> Sort Collection of Objects by Multiple Fields in Java

>> Iterate Through Two ArrayLists Simultaneously

>> Inserting an Object in an ArrayList at a Specific Position

>> The Factory Design Pattern in Java

>> Thread vs. Single Thread Executor Service

>> Filling a List With All Enum Values in Java

>> Retain Only Digits and Decimal Separator in String

>> Finding Max Date in List Using Streams

>> Apache Camel Exception Handling

>> Convert java.util.Date to java.sql.Date

>> Can a Java Application Use More Memory than the Heap Size?

>> How to Insert a HashMap Into MongoDB With Java?

>> How to Check if All Runnables Are Done

>> Convert String to Instant

>> Slicing Arrays in Java

>> Difference Between Map and MultivaluedMap in Java

>> Java Program to Calculate the Standard Deviation

>> A Guide to LinkedHashSet in Java

>> Fixing the “java: integer number too large” Error

>> Convert String to String Array

>> Implementing Factory Pattern With Generics in Java

>> Convert String to char in Java

>> Guide to Simple Binary Encoding

>> Capitalize the First Letter of a String in Java

>> Coupling in Java

>> Understanding java.lang.Thread.State: WAITING (parking)

>> Channels and Connections in RabbitMQ

>> Validating URL in Java

>> Difference Between Java Enumeration and Iterator

>> Java Literals

>> Infinity in Java

>> Variable Instantiation on Declaration vs. on Constructor in Java

>> Port Scanning With Java

>> Using Streams to Collect Into a TreeSet

>> Dealing with “java.lang.OutOfMemoryError: PermGen space” Error

>> Difference Between Flux and Mono

>> Initializing a Boolean Array in Java

>> Writing a List of Strings Into a Text File

>> Set vs List in Java

>> Convert a List to a Comma-Separated String

>> Validate UUID String in Java

>> Differences Between Paths.get and Path.of

>> Java Scanner Taking a Character Input

>> Create a BMI Calculator in Java

>> String Concatenation in Java

>> TriFunction Interface in Java

>> Getting the Filename From a String Containing an Absolute File Path

>> Creating Random Numbers With No Duplicates in Java

>> Create Date From Unix Timestamp in Java

>> Difference Between Class.getResource() and ClassLoader.getResource()

>> Fixed Size Queue Implementations in Java

>> What Is the null Type in Java?

>> Constructing a Relative Path From Two Absolute Paths in Java

>> Guide to Find the Java .class Version

>> Static Fields and Garbage Collection

>> Java Program to Find the Roots of a Quadratic Equation

>> Handle Classes With the Same Name in Java

>> Make Division of Two Integers Result in a Float

>> Compare Characters in Java

>> Remove the Last Character of a Java StringBuilder

>> List All Factors of a Number in Java

>> Armstrong Numbers in Java

>> Difference Between Arrays.asList() and List.of()

>> What Is “Locked Ownable Synchronizers” in Thread Dump?

>> Toggle a Boolean Variable in Java

>> Check if a Number Is Positive or Negative in Java

>> Integer.toString() vs String.valueOf() in Java

>> Java 8 Streams: Multiple Filters vs. Complex Condition

>> Named Placeholders in String Formatting

>> Replace Element at a Specific Index in a Java ArrayList

>> Arrays.asList() vs Collections.singletonList()

>> How to Check Whether an Integer Exists in a Range with Java

>> Get the Current Stack Trace in Java

>> Volatile vs. Atomic Variables in Java

>> Scanning Java Annotations At Runtime

>> Implementing a Map with Multiple Keys in Java

>> Static vs. Instance Initializer Block in Java

>> Filter Java Stream to 1 and Only 1 Element

>> Remove Whitespace From a String in Java

>> A Guide to Java Source and Target Options

>> Using @NotNull on a Method Parameter

>> How to Truncate a String in Java

>> Advantages and Disadvantages of Using Java Wildcard Imports

>> Get the Full Path of a JAR File From a Class

>> Clearing a StringBuilder or StringBuffer

>> Guide to Creating Jar Executables and Windows Executables from Java

>> Java 14 Record vs. Lombok

>> Use Cases for Static Methods in Java

>> How to Split a Stream into Multiple Streams

>> How to Convert InputStream to Base64 String

>> Check if a Number Is Odd or Even in Java

>> Creating JAR Files Programmatically

>> Is There a Destructor in Java?

>> How to Calculate “Time Ago” in Java

>> Difference Between Java SE/EE/ME

>> Difference Between parseInt() and valueOf() in Java

>> Check if at Least Two Out of Three Booleans Are True in Java

>> Check if BigDecimal Value Is Zero

>> Java “int/char Cannot Be Dereferenced” Error

>> Sort a List Alphabetically in Java

>> Reverse an ArrayList in Java

>> Sorting Objects in a List by Date

>> Difference Between Thread’s Context Class Loader and Normal Class Loader

>> How to Play Sound With Java

>> Check if a Character is a Vowel in Java

>> Constraint Composition with Bean Validation

>> Find Files that Match Wildcard Strings in Java

>> Java Scanner useDelimiter with Examples

>> Reverse a Number in Java

>> Posting with Java HttpClient

>> Differences Between Iterator and Iterable and How to Use Them?

>> Differences Between set() and lazySet() in Java Atomic Variables

>> Swap Two Variables in Java

>> Difference Between == and equals() in Java

>> Compile Multiple Java Source Files Using the Command Line

>> Get the ASCII Value of a Character in Java

>> Serialize a Lambda in Java

>> Java Scanner.skip method with examples

>> Generate a Random Value From an Enum

>> Illegal Character Compilation Error

>> Working With a List of Lists in Java

>> How to Store HashMap<String, ArrayList> Inside a List

>> Creating a Java Array from Regular Expression Matches

>> List vs. ArrayList in Java

>> Implements vs. Extends in Java

>> Convert boolean to int in Java

>> Java 9 Illegal Reflective Access Warning

>> Convert Byte Size Into a Human-Readable Format in Java

>> How Does the Spring Singleton Bean Serve Concurrent Requests?

>> Common Command-Line Compile Errors in Java

>> Java Error “variable might not have been initialized”

>> Java Error “bad operand types for binary operator”

>> Format Instant to String in Java

>> Find the Difference Between Two Sets

>> Compile All Java Classes in Directory Structure with javac

>> Read User Input Until a Condition is Met

>> The for-each Loop in Java

>> Java Operators

>> Subtract Days from a Date in Java

>> Difference Between POJO, JavaBeans, DTO and VO

>> Automorphic Numbers in Java

>> Convert long to int Type in Java

>> Acquire a Lock by a Key in Java

>> Does GC Release Back Memory to OS?

>> Guide to ByteBuffer

>> Read a File Into a Map in Java

>> How to Create a New Entry in a Map

>> Java Missing Return Statement

>> Difference Between Map and HashMap in Java

>> Producer-Consumer Problem With Example in Java

>> How to Invert a Map in Java

>> Convert Between Byte Array and UUID in Java

>> Create an Empty Map in Java

>> How to use JNI’s RegisterNatives() method?

>> Java ArrayIndexOutOfBoundsException

>> Javadoc: @see, @link, and @inheritDoc

>> Adding EventHandler to JavaFX Button

>> What Is the Difference Between NIO and NIO.2?

>> Java Concurrent HashSet Equivalent to ConcurrentHashMap

>> Constructor Specification in Java

>> Java IdentityHashMap Class and Its Use Cases

>> Find All Jars Containing Given Class

>> Hidden Classes in Java 15

>> An Introduction to InstantSource in Java 17

>> Generating a Java String of N Repeated Characters

>> Check if a String Ends with a Certain Pattern in Java

>> SequenceInputStream Class in Java

>> Random Number Generators in Java 17

>> Lombok Configuration System

>> String equals() Vs contentEquals() in Java

>> Split a String Every n Characters in Java

>> Working with (Unknown Source) Stack Traces in Java

>> A Brief History of the Java Programming Language

>> Multiple Line Code Example in Javadoc Comment

>> Volatile Variables and Thread Safety

>> Convert String to Float and Back in Java

>> Set the Name of a Thread in Java

>> Use Dot “.” as the Decimal Separator in Java

>> Simulate touch Command in Java

>> Check if an Enum Value Exists in Java

>> Java Implicit Super Constructor is Undefined Error

>> Lombok Using @With Annotations

>> Reading Values From Excel in Java

>> Getting a Bit at a Certain Position from Integral Values

>> Solving the Hide Utility Class Public Constructor Sonar Warning

>> Add an Image to a Cell in an Excel File With Java

>> Convert a ByteBuffer to String in Java

>> JMX Ports

>> Java HashMap With Different Value Types

>> Concatenating Null Strings in Java

>> Adding a Column to an Excel Sheet Using Apache POI

>> Add Borders to Excel Cells With Apache POI

>> Invoke a Static Method Using Java Reflection API

>> Java Classpath Syntax in Linux vs. Windows

>> Declaring Val and Var Variables in Lombok

>> Omitting Getter or Setter in Lombok

>> Compare Strings While Ignoring Whitespace in Java

>> Constructors in Java Abstract Classes

>> Ignoring Commas in Quotes When Splitting a Comma-separated String

>> Remove HTML Tags Using Java

>> Check if the First Letter of a String is Uppercase

>> Nested HashMaps Examples in Java

>> List All the Classes Loaded in the JVM

>> Split a String Only on the First Occurrence of Delimiter

>> Serialization Validation in Java

>> New Features in Java 17

>> Guide to Garbage Collector Roots

>> Introduction to HexFormat in Java 17

>> Chaining Constructors in Java

>> Splitting a Java String by Multiple Delimiters

>> What Is the –release Option in the Java 9 Compiler?

>> Remove Beginning and Ending Double Quotes from a String

>> Convert an Object to a Byte Array in Java

>> Java Map – keySet() vs. entrySet() vs. values() Methods

>> Getting a Character by Index From a String in Java

>> Pattern Matching for Switch

>> Introduction to the Evrete Rule Engine

>> Remove Accents and Diacritics From a String in Java

>> Remove an Entry from a Java HashMap

>> Convert a Byte Array to a Numeric Representation in Java

>> Reactive Streams API with Ratpack

>> Get a Field’s Annotations Using Reflection

>> Update the Value Associated With a Key in a HashMap

>> Guide to Using ModelMapper

>> Error Handling in gRPC

>> Using a Custom Class as a Key in a Java HashMap

>> Get the Last Word of a String

>> Convert Long to String in Java

>> Add a Reference to Method Parameters in Javadoc

>> Email Validation in Java

>> Get a Submap From a HashMap in Java

>> New Features in Java 16

>> Java Sound API – Capturing Microphone

>> Count Spaces in a Java String

>> Fixing the “Declared package does not match the expected package” Error

>> Collecting Stream Elements into a List in Java

>> Get All Running JVM Threads

>> Priority of a Thread in Java

>> Performance of System.arraycopy() vs. Arrays.copyOf()

>> Guide to mapMulti in Stream API

>> Javadoc: @version and @since

>> Format a Milliseconds Duration to HH:MM:SS

>> Display Custom Items in JavaFX ListView

>> Compare the Content of Two Files in Java

>> Validate String as Filename in Java

>> Throwing Exceptions in Constructors

>> Choosing a GC Algorithm in Java

>> Java Annotation Attribute Value Restrictions

>> Bitmasking in Java with Bitwise Operators

>> Diagnosing a Running JVM

>> Looking for a Java Team Lead with Spring Experience (Remote) (Part Time) (not open)

>> How to Create Password-Protected Zip Files and Unzip Them in Java

>> Linking to an External URL in Javadoc

>> Is java.sql.Connection Thread-Safe?

>> Significance of Getters and Setters in Java

>> Valid @SuppressWarnings Warning Names

>> Why Missing Annotations Don’t Cause ClassNotFoundException

>> Convert a String to Camel Case

>> Guava’s Futures and ListenableFuture

>> Guide to Java BigInteger

>> Static Classes Versus the Singleton Pattern in Java

>> Tiered Compilation in JVM

>> Converting String to BigInteger in Java

>> Find the GC Algorithm Used by a JVM Instance

>> Count Occurrences Using Java groupingBy Collector

>> Start Two Threads at the Exact Same Time in Java

>> Converting Camel Case and Title Case to Words in Java

>> “Code too large” Compilation Error in Java

>> Different Serialization Approaches for Java

>> Lookahead and Lookbehind in Java Regex

>> Generating Alphanumeric UUID String in Java

>> Collection.toArray(new T[0]) or .toArray(new T[size])

>> Private Constructors in Java

>> Logical vs Bitwise OR Operator

>> How to Get the Number of Threads in a Java Process

>> How to Implement Min-Max Heap In Java

>> Java DocLint

>> Connection Timeout vs. Read Timeout for Java Sockets

>> Capturing Image From Webcam In Java

>> Interface With Default Methods vs Abstract Class

>> Referencing a Method in Javadoc Comments

>> Java – Path vs File

>> Non-Capturing Regex Groups in Java

>> Private Methods in Java Interfaces

>> Iterate Over a Set in Java

>> Understanding the Pattern.quote Method

>> Find All Numbers in a String in Java

>> Finding All Classes in a Java Package

>> Downloading Email Attachments in Java

>> Maximum Size of Java Arrays

>> IllegalAccessError in Java

>> Deserialization Vulnerabilities in Java

>> JVM Parameters InitialRAMPercentage, MinRAMPercentage, and MaxRAMPercentage

>> Converting String to BigDecimal in Java

>> Split a String in Java and Keep the Delimiters

>> When to Use a Parallel Stream in Java

>> Java Objects.hash() vs Objects.hashCode()

>> Using an Interface vs. Abstract Class in Java

>> Getting the Java Version at Runtime

>> Converting a Java Keystore Into PEM Format

>> Concatenate Two Arrays in Java

>> What are Compile-time Constants in Java?

>> JVM Storage for Static Members

>> Convert an Array of Primitives to an Array of Objects

>> Advise Methods on Annotated Classes With AspectJ

>> How to Handle InterruptedException in Java

>> Split Java String by Newline

>> The package-info.java File

>> Convert a Java Enumeration Into a Stream

>> Java NIO DatagramChannel

>> RSA in Java

>> Java Technical Editor (part-time)

>> Java Class File Naming Conventions

>> Returning Stream vs. Collection

>> The Java final Keyword – Impact on Performance

>> How Many Threads Can a Java VM Support?

>> Invoking a Private Method in Java

>> Converting Java Properties to HashMap

>> Java Deque vs. Stack

>> Optimizing HashMap’s Performance

>> Where Does Java’s String Constant Pool Live, the Heap or the Stack?

>> Java Warning “Unchecked Cast”

>> Java HashMap Load Factor

>> Guide to Implementing the compareTo Method

>> Bad Practices With Synchronization

>> Java Warning “unchecked conversion”

>> Using the Map.Entry Java Class

>> An Introduction to the Constant Pool in the JVM

>> Is Java a Compiled or Interpreted Language?

>> Structural Patterns in Core Java

>> Introduction to JVM Intrinsics

>> How to Analyze Java Thread Dumps

>> Experimental Garbage Collectors in the JVM

>> Evaluating a Math Expression in Java

>> Using a Byte Array as Map Key in Java

>> Binary Semaphore vs Reentrant Lock

>> Java File Separator vs File Path Separator

>> New Features in Java 12

>> New Features in Java 11

>> Character#isAlphabetic vs. Character#isLetter

>> Collections.synchronizedMap vs. ConcurrentHashMap

>> Behavioral Patterns in Core Java

>> New Features in Java 14

>> Viewing Contents of a JAR File

>> Writing byte[] to a File in Java

>> ArrayList vs. LinkedList vs. HashMap in Java

>> Comparing Doubles in Java

>> Get a Filename Without the Extension in Java

>> Introduction to Servlets and Servlet Containers

>> NoSuchFieldError in Java

>> How to Access an Iteration Counter in a For Each Loop

>> What’s New in Java 15

>> The Capacity of an ArrayList vs the Size of an Array in Java

>> Explanation of ClassCastException in Java

>> Creating a Generic Array in Java

>> Sealed Classes and Interfaces in Java

>> Localizing Exception Messages in Java

>> Java IndexOutOfBoundsException “Source Does Not Fit in Dest”

>> Functional Programming in Java

>> Check if a Java Program Is Running in 64-Bit or 32-Bit JVM

>> Extending Enums in Java

>> Java (String) or .toString()?

>> The transient Keyword in Java

>> Understanding the & 0xff Value in Java

>> AbstractMethodError in Java

>> Apache Commons Collections vs Google Guava

>> Get Names of Classes Inside a JAR File

>> How to Import a .cer Certificate Into a Java KeyStore

>> Performance of removeAll() in a HashSet

>> Constants in Java: Patterns and Anti-Patterns

>> Finding a Free Port in Java

>> Creational Design Patterns in Core Java

>> How to Stop Execution After a Certain Time in Java

>> Checking if a Java Class is ‘abstract’ Using Reflection

>> Using JNA to Access Native Dynamic Libraries

>> Using libphonenumber to Validate Phone Numbers

>> Get a List of Trusted Certificates in Java

>> Reversing a Linked List in Java

>> The Difference Between a.getClass() and A.class in Java

>> Find the Last Modified File in a Directory with Java

>> Listing the Available Cipher Algorithms

>> Get the First Key and Value From a HashMap

>> Does a Method’s Signature Include the Return Type in Java?

>> Checking If a Method is Static Using Reflection in Java

>> Guide to the System Rules Library

>> Sending Emails with Attachments in Java

>> Arrays.asList vs new ArrayList(Arrays.asList())

>> Checking if a Class Exists in Java

>> Difference Between when() and doXxx() Methods in Mockito

>> SSH Connection With Java

>> Creating Temporary Directories in Java

>> IllegalMonitorStateException in Java

>> Assert Two Lists for Equality Ignoring Order in Java

>> Guide to ArrayStoreException

>> IllegalArgumentException or NullPointerException for a Null Parameter?

>> Introduction to keytool

>> Reading a Line at a Given Line Number From a File in Java

>> NoSuchMethodError in Java

>> How to Define a Map in YAML for a POJO?

>> What Is the Difference Between DVM and JVM?

>> List All Classes Loaded in a Specific Class Loader

>> A Guide to Concurrent Queues in Java

>> JPA Entity Equality

>> Finding the Differences Between Two Lists in Java

>> Probability in Java

>> Java Reporting Tools: a Comparison

>> Java Files Open Options

>> Set Field Value With Reflection

>> Difference Between request.getSession() and request.getSession(true)

>> Determine if an Object is of Primitive Type

>> Copy a Directory in Java

>> Performance Comparison of boolean[] vs BitSet

>> A Guide to async-profiler

>> Difference in Used, Committed, and Max Heap Memory

>> Introduction to Transactions in Java and Spring

>> Check If a File or Directory Exists in Java

>> How to Implement a CNN with Deeplearning4j

>> When are Static Variables Initialized in Java?

>> Comparing Arrays in Java

>> Taking Screenshots Using Java

>> System.console() vs. System.out

>> Setting Formulas in Excel with Apache POI

>> Using Mockito ArgumentCaptor

>> Guide to SDKMAN!

>> A Guide to BitSet in Java

>> Command-Line Tools to Find the Java Heap Size

>> Jess Rule Engine and JSR 94

>> Liskov Substitution Principle in Java

>> Converting List to Map With a Custom Supplier

>> Performance Effects of Exceptions in Java

>> Check If a Directory Is Empty in Java

>> How to Read PEM File to Get Public and Private Keys

>> Unit Testing of System.out.println() with JUnit

>> A Guide to False Sharing and @Contended

>> Java Generics – <?> vs <? extends Object>

>> Garbage Collection Logging to a File in Java

>> Difference Between Statement and PreparedStatement

>> Interface Segregation Principle in Java

>> Class.isInstance vs Class.isAssignableFrom and instanceof

>> Version Comparison in Java

>> Garbage Collection and Cyclic References in Java

>> Memory Address of Objects in Java

>> Run a Java Main Method in Maven

>> Reading the Value of ‘private’ Fields from a Different Class in Java

>> Convert an Array of Primitives to a List

>> Loading JDBC Drivers

>> Adding Text to an Image in Java

>> Why are Local Variables Thread-Safe in Java

>> Converting a Java String Into a Boolean

>> Measuring Object Sizes in the JVM

>> How Can I Resize an Image Using Java?

>> Configuring Stack Sizes in the JVM

>> Division by Zero in Java: Exception, Infinity, or Not a Number

>> When Does Java Throw the ExceptionInInitializerError?

>> How to Count the Number of Matches for a Regex?

>> Print an Integer in Binary Format in Java

>> Mapping Collections with MapStruct

>> When Does Java Throw UndeclaredThrowableException?

>> Where Is the Array Length Stored in JVM?

>> Memory Layout of Objects in Java

>> Getting MAC addresses in Java

>> The Covariant Return Type in Java

>> Implementing a Ring Buffer in Java

>> Java Heap Space Memory with the Runtime API

>> Guide to Apache BookKeeper

>> Easy Ways to Write a Java InputStream to an OutputStream

>> Number Formatting in Java

>> Implementing a 2048 Solver in Java

>> Why Not To Start A Thread In The Constructor?

>> Java IOException “Too many open files”

>> Getting the Week Number From Any Date

>> Exploring JVM Tuning Flags

>> boolean and boolean[] Memory Layout in the JVM

>> View Bytecode of a Class File in Java

>> The Constructor Return Type in Java

>> What is [Ljava.lang.Object;?

>> The “Cannot find symbol” Compilation Error

>> <init> and <clinit> Methods in the JVM

>> String Concatenation with Invoke Dynamic

>> What Causes java.lang.OutOfMemoryError: unable to create new native thread

>> Casting int to Enum in Java

>> Super Type Tokens in Java Generics

>> Comparing Objects in Java

>> An Introduction to Invoke Dynamic in the JVM

>> Univocity Parsers

>> LinkedBlockingQueue vs ConcurrentLinkedQueue

>> Introduction to Exchanger in Java

>> CQRS and Event Sourcing in Java

>> Clicking Elements in Selenium using JavaScript

>> How to Call Python From Java

>> Open/Closed Principle in Java

>> Java 14 Record Keyword

>> Finding an Object’s Class in Java

>> Introduction to Finagle

>> Introduction to Lock-Free Data Structures with Java Examples

>> Generating PDF Files Using Thymeleaf

>> Foreign Memory Access API in Java 14

>> Validate Phone Numbers With Java Regex

>> Mapping Lists with ModelMapper

>> Invoking a SOAP Web Service in Java

>> Constructing a JPA Query Between Unrelated Entities

>> Java-R Integration

>> Encode a String to UTF-8 in Java

>> Guide to AtomicStampedReference in Java

>> The Difference Between mockito-core and mockito-all

>> A Guide to jpackage in Java 14

>> Should We Close a Java Stream?

>> The Map.computeIfAbsent() Method

>> Handling java.net.ConnectException

>> Introduction to DBUnit

>> How to Extract a Mono’s Content in Java

>> Introduction to Mockito’s AdditionalAnswers

>> BSON to JSON Document Conversion in Java

>> Java Map With Case-Insensitive Keys

>> HTTP/2 in Netty

>> Java Thread Deadlock and Livelock

>> Guide to the Number Class in Java

>> Checksums in Java

>> Helpful NullPointerExceptions in Java 14

>> Intro to Coroutines with Quasar

>> Add BigDecimals using the Stream API

>> How to determine day of week by passing specific date in Java?

>> Comparing Long Values in Java

>> Testing Multi-Threaded Code in Java

>> Fixing “constant string too long” Build Error

>> Java ArrayList vs LinkedList

>> Regular Expressions \s and \s+ in Java

>> Boruvka’s Algorithm for Minimum Spanning Trees in Java

>> Guide to AtomicMarkableReference

>> Java Convert PDF to Base64

>> Introduction to Lock Striping

>> Java IO vs NIO

>> Introduction to Alibaba Arthas

>> Difference Between Thread and Virtual Thread in Java

>> L-Trim and R-Trim Alternatives in Java

>> Optical Character Recognition with Tesseract

>> Guide To The Java Authentication And Authorization Service (JAAS)

>> Using NullAway to Avoid NullPointerExceptions

>> How to Use Regular Expressions to Replace Tokens in Strings in Java

>> Could Not Reserve Enough Space For Object Heap

>> Finding the Spring Version

>> Capturing a Java Thread Dump

>> Pattern Matching for instanceof in Java 14

>> Fast Pattern Matching of Strings Using Suffix Tree in Java

>> Java Suppressed Exceptions

>> Introduction to Takes

>> DDD Bounded Contexts and Java Modules

>> Connect Java to a MySQL Database

>> ThreadPoolTaskExecutor corePoolSize vs. maxPoolSize

>> Check for null Before Calling Parse in Double.parseDouble

>> How to Lock a File in Java

>> Swagger @ApiParam vs @ApiModelProperty

>> Asynchronous HTTP Programming with Play Framework

>> Design Principles and Patterns for Highly Concurrent Applications

>> Executors newCachedThreadPool() vs newFixedThreadPool()

>> Configuring Thread Pools for Java Web Servers

>> Introduction to cache2k

>> Introduction to the jcabi-aspects AOP Annotations Library

>> Getting Started with CRaSH

>> Arrays.deepEquals

>> How to Handle Java SocketException

>> The Java Headless Mode

>> Intro to OpenCV with Java

>> Guide to AVL Trees in Java

>> Case-Insensitive String Matching in Java

>> Java Text Blocks

>> What’s New in Gradle 6.0

>> Introduction to Open Liberty

>> How to Create a Slack Plugin in Java

>> Difference Between Java Matcher find() and matches()

>> Final vs Effectively Final in Java

>> Introduction to Dropwizard

>> java.net.UnknownHostException: Invalid Hostname for Server

>> Guide to the Cactoos Library

>> Parsing Command-Line Parameters with Airline

>> Generating Barcodes and QR Codes in Java

>> Working with Lazy Element Collections in JPA

>> Creating a LocalDate with Values in Java

>> Guide to Work Stealing in Java

>> Balanced Brackets Algorithm in Java

>> List All Available Redis Keys

>> Introduction to Jsoniter

>> What Causes java.lang.reflect.InvocationTargetException?

>> New Features in Java 13

>> Introduction to Big Queue

>> Java Preview Features

>> Generating Random Numbers in Java

>> Asynchronous Programming in Java

>> Partitioning and Sorting Arrays with Many Repeated Entries with Java Examples

>> Efficiently Merge Sorted Java Sequences

>> Looking for Java Developer to Help with Brainstorming Topics for the Site (not open)

>> Obtaining a Power Set of a Set in Java

>> Guide to the @Serial Annotation in Java 14

>> Java Do-While Loop

>> Java While Loop

>> Java For Loop

>> Convert Double to Long in Java

>> Decompiling Classes in Java

>> How to Return Multiple Values From a Java Method

>> Guide to the Java finally Keyword

>> Arrays.sort vs Arrays.parallelSort

>> Branch Prediction in Java

>> Sending Emails with Logback

>> Kruskal’s Algorithm for Spanning Trees with a Java Implementation

>> Range Search Algorithm in Java

>> Bitwise & vs Logical && Operators

>> Using the Not Operator in If Conditions in Java

>> How to Set the JVM Time Zone

>> Median of Stream of Integers using Heap in Java

>> Introduction to Ninja Framework

>> Quick Guide to the Java Stack

>> Java Scanner

>> Get Substring from String in Java

>> Pre-compile Regex Patterns Into Pattern Objects

>> A Quick Guide to Post Requests with OkHttp

>> Wrapping vs Rethrowing Exceptions in Java

>> How to Merge Two Sorted Arrays in Java

>> How to Print a Binary Tree Diagram

>> Object-Oriented-Programming Concepts in Java

>> Java Default Parameters Using Method Overloading

>> Organizing Layers Using Hexagonal Architecture, DDD, and Spring

>> Runtime.getRuntime().halt() vs System.exit() in Java

>> Adding Shutdown Hooks for JVM Applications

>> Clean Coding in Java

>> Check if Two Strings are Anagrams in Java

>> Prim’s Algorithm with a Java Implementation

>> Circular Linked List Java Implementation

>> Introduction to Spark Graph Processing with GraphFrames

>> Intro to Apache Tapestry

>> Checking if Two Java Dates are On the Same Day

>> Overflow and Underflow in Java

>> Basic Calculator in Java

>> Guide to RejectedExecutionHandler

>> Java Compiler Error: illegal start of expression

>> WebSockets with the Play Framework and Akka

>> Common Concurrency Pitfalls in Java

>> The Caesar Cipher in Java

>> Remote Debugging with IntelliJ IDEA

>> Implementing A* Pathfinding in Java

>> Benchmark JDK Collections vs Eclipse Collections

>> Get the Current Date Prior to Java 8

>> Is It a Bad Practice to Catch Throwable?

>> What is a POJO Class?

>> The strictfp Keyword in Java

>> Skipping Weekends While Adding Days to LocalDate in Java 8

>> Using Lombok’s @Accessors Annotation

>> The Bridge Pattern in Java

>> Debugging Java 8 Streams with IntelliJ

>> Find the Smallest Missing Integer in an Array

>> How to Determine if a Binary Tree is Balanced in Java

>> Parsing Command-Line Parameters with JCommander

>> Scanner nextLine() Method

>> Practical Application of Test Pyramid in Spring-based Microservice

>> Generating Random Dates in Java

>> Causes and Avoidance of java.lang.VerifyError

>> Defensive Copies for Collections Using AutoValue

>> Java Scanner hasNext() vs. hasNextLine()

>> Converting Java Date to OffsetDateTime

>> How to Count Duplicate Elements in Arraylist

>> Knapsack Problem Implementation in Java

>> Prototype Pattern in Java

>> Java ‘protected’ Access Modifier

>> Adding an Element to a Java Array vs an ArrayList

>> Java Application Remote Debugging

>> Validations for Enum Types

>> Breadth-First Search Algorithm in Java

>> Digital Signatures in Java

>> Searching for a String in an ArrayList

>> The State of Java in 2019

>> The Java File Class

>> Intro to the Java SecurityManager

>> A Guide to Java HashMap

>> Java FileWriter

>> Methods in Java

>> System.out.println vs Loggers

>> Flogger Fluent Logging

>> Threading Models in Java

>> Authentication with HttpUrlConnection

>> Grouping Javax Validation Constraints

>> Parsing an XML File Using SAX Parser

>> Comparing Dates in Java

>> Bucket Sort in Java

>> Logistic Regression in Java

>> Unmarshalling Dates Using JAXB

>> Create a File in a Specific Directory in Java

>> Get Started with Java

>> Radix Sort in Java

>> OCP Certification – Advanced Java Class Design

>> Guide to System.gc()

>> Java – “Could Not Find or Load Main Class” Error

>> Finding the Difference Between Two Strings in Java

>> Java Copy Constructor

>> Generating Random Numbers in a Range in Java

>> Listing Numbers Within a Range in Java

>> A Guide to the Java FileReader Class

>> Removing an Element From an ArrayList

>> Primitive Collections in Eclipse Collections

>> How to Avoid the Java FileNotFoundException When Loading Resources

>> Convert Character Array to String in Java

>> Command-Line Arguments in Java

>> Implementing a Simple Blockchain in Java

>> Java ‘private’ Access Modifier

>> Java ‘public’ Access Modifier

>> Counting Sort in Java

>> Parsing an XML File Using StAX

>> The XOR Operator in Java

>> Using a Mutex Object in Java

>> Checked and Unchecked Exceptions in Java

>> A Guide to System.exit()

>> An Intro to the Java Debug Interface (JDI)

>> Counting Words in a String with Java

>> Finding the Least Common Multiple in Java

>> Memento Design Pattern in Java

>> Creating a Triangle with for Loops in Java

>> Debugging with Eclipse

>> Interpolation Search in Java

>> Java String equalsIgnoreCase()

>> Guide to In-Place Sorting Algorithm Works with a Java Implementation

>> Calculating Logarithms in Java

>> Selection Sort in Java

>> A Guide to Java GSS API

>> Finding Greatest Common Divisor in Java

>> Find the Number of Lines in a File Using Java

>> Evaluation of Methods References in Java

>> Java ‘Hello World’ Example

>> Javax BigDecimal Validation

>> Automatic Generation of the Builder Pattern with FreeBuilder

>> An Introduction to Java SASL

>> Binary Numbers in Java

>> A Guide to Increment and Decrement Unary Operators in Java

>> Sorting Strings by Contained Numbers in Java

>> The Basics of Java Security

>> Convert String to Double in Java

>> Modifying an XML Attribute in Java

>> Composition, Aggregation, and Association in Java

>> Depth First Search in Java

>> Guide to StreamTokenizer

>> Shell Sort in Java

>> Creating the Java Builder for a Class in IntelliJ

>> String toLowerCase and toUpperCase Methods in Java

>> Checking if a URL Exists in Java

>> Checking If an Array Is Sorted in Java

>> Looping Diagonally Through a 2d Java Array

>> Transferring a File Through SFTP in Java

>> Get the Current Working Directory in Java

>> The Proxy Pattern in Java

>> Lossy Conversion in Java

>> Quick Guide to EasyRandom in Java

>> Matrix Multiplication in Java

>> Guide to Java BiFunction Interface

>> Removing an Element from an Array in Java

>> How to Reverse a String in Java

>> The Java SecureRandom Class

>> Java Multi-line String

>> Checking If a String Is a Repeated Substring

>> Checking for Empty or Blank Strings in Java

>> Key Value Store with Chronicle Map

>> Check If a String Is a Valid Date in Java

>> Breaking Out of Nested Loops

>> The Difference Between Collection.stream().forEach() and Collection.forEach()

>> Guide to Java Parallel Collectors Library

>> Java 8 Stream skip() vs limit()

>> Templating with Handlebars

>> Java IntStream Conversions

>> Converting Iterator to List

>> How to Break from Java Stream forEach

>> Raw Types in Java

>> Checking If a List Is Sorted in Java

>> Google AutoService

>> Understanding the JAR Manifest File

>> A Guide to the Folding Technique in Java

>> Converting JSON to CSV in Java

>> Converting Iterable to Collection in Java

>> Determine File Creation Date in Java

>> Checking if a Java Graph has a Cycle

>> Introduction to SPF4J

>> Copying Sets in Java

>> Java Optional as Return Type

>> A Guide to Crawler4j

>> Java 8 Collectors toMap

>> Will an Error Be Caught by Catch Block in Java?

>> Understanding the NumberFormatException in Java

>> Design Strategies for Decoupling Java Modules

>> Guide to Java FileChannel

>> Negate a Predicate Method Reference with Java 11

>> How to Delay Code Execution in Java

>> Persisting Enums in JPA

>> Removing Stopwords from a String in Java

>> String API Updates in Java 12

>> Difference Between a Java Keystore and a Truststore

>> String Initialization in Java

>> Converting Between Stream and Array in Java

>> How to Find an Exception’s Root Cause in Java

>> Java Localization – Formatting Messages

>> Create a Java Command Line Program with Picocli

>> Void Type in Java

>> Guide to Classgraph Library

>> Run a Java Application from the Command Line

>> Multi-Module Maven Application with Java Modules

>> Guide to FastUtil

>> Convert Time to Milliseconds in Java

>> Extending an Array’s Length

>> Check If a String Contains a Substring

>> Java 9 Migration Issues and Resolutions

>> Set Operations in Java

>> Generic Constructors in Java

>> Anonymous Classes in Java

>> Why Do Local Variables Used in Lambdas Have to Be Final or Effectively Final?

>> Copying a HashMap in Java

>> Compressed OOPs in the JVM

>> Spring Cloud Data Flow With Apache Spark

>> Reversing a Binary Tree in Java

>> Avoid Check for Null Statement in Java

>> Cannot Reference “X” Before Supertype Constructor Has Been Called

>> A Guide to jBPM with Java

>> Transforming an Empty String into an Empty Optional

>> Find If Two Numbers Are Relatively Prime in Java

>> The Mediator Pattern in Java

>> Differences Between JAR and WAR Packaging

>> Map of Primitives in Java

>> Read an InputStream using the Java Server Socket

>> Guide to jlink

>> Converting Between LocalDate and XMLGregorianCalendar

>> Introduction to Project Amber

>> How to Fix java.lang.UnsupportedClassVersionError

>> Method Inlining in the JVM

>> Making a JSON POST Request With HttpURLConnection

>> Currying in Java

>> Guide to java.lang.ProcessBuilder API

>> Using the @Singular Annotation with Lombok Builders

>> Filtering a Java Collection by a List

>> An Introduction to Epsilon GC: A No-Op Experimental Garbage Collector

>> Introduction to the Null Object Pattern

>> Guide to Stream.reduce()

>> Time Comparison of Arrays.sort(Object[]) and Arrays.sort(int[])

>> Java’s Time-Based Releases

>> JDK Configuration for Maven Build in Eclipse

>> Native Memory Tracking in JVM

>> A Guide to the Reflections Library

>> How to Change Java Version in an Eclipse Project

>> The Adapter Pattern in Java

>> Guide to Apache Commons MultiValuedMap

>> Performance Comparison of Primitive Lists in Java

>> Multi-Release Jar Files

>> Creating a Custom Annotation in Java

>> Java Valhalla Project

>> Working With Maps Using Streams

>> Determine If All Elements Are the Same in a Java List

>> Defining a Char Stack in Java

>> An Introduction to ZGC: A Scalable and Experimental Low-Latency JVM Garbage Collector

>> Guide to Creating and Running a Jar File in Java

>> Marker Interfaces in Java

>> Differences Between Oracle JDK and OpenJDK

>> Method References in Java

>> Java Classes and Objects

>> Common String Operations in Java

>> List of Primitive Integer Values in Java

>> Java Bitwise Operators

>> List Files in a Directory in Java

>> Check If a String Contains Multiple Keywords in Java

>> OpenJDK Project Loom

>> Blade – A Complete Guidebook

>> Guide to XMPP Smack Client

>> Convert a Float to a Byte Array in Java

>> Delete the Contents of a File in Java

>> Finding Leap Years in Java

>> Variable Scope in Java

>> Counting Matches on a Stream Filter

>> Implementing Simple State Machines with Java Enums

>> Create a Directory in Java

>> Retrieve Fields from a Java Class Using Reflection

>> Summing Numbers with Java Streams

>> How to Write to a CSV File in Java

>> Setting up Lombok with Eclipse and Intellij

>> Java 8 Streams peek() API

>> Map to String Conversion in Java

>> Converting Between LocalDate and SQL Date

>> How to Find JAVA_HOME

>> Enabling TLS v1.2 in Java 7

>> Using Curl in Java

>> Java instanceof Operator

>> Intro to Derive4J

>> Attaching Values to Java Enum

>> Differences Between ZonedDateTime and OffsetDateTime

>> What is Thread-Safety and How to Achieve it?

>> Guide to the Java Queue Interface

>> Java toString() Method

>> Java Interfaces

>> Permutations of an Array in Java

>> Monitoring Java Applications with Flight Recorder

>> Check if a String is a Pangram in Java

>> Java ArrayList vs Vector

>> Java Two Pointer Technique

>> Java String Interview Questions and Answers

>> Control Structures in Java

>> Multi Dimensional ArrayList in Java

>> Immutable Set in Java

>> Java @SafeVarargs Annotation

>> Java @Deprecated Annotation

>> Java @SuppressWarnings Annotation

>> Java @Override Annotation

>> If-Else Statement in Java

>> The Java Native Keyword and Methods

>> Introduction to Basic Syntax in Java

>> Java 11 Nest Based Access Control

>> Convert a Comma Separated String to a List in Java

>> Concatenating Strings In Java

>> Passing Parameters to Java Threads

>> Differences Between HashMap and Hashtable in Java

>> Verbose Garbage Collection in Java

>> Replace a Character at a Specific Index in a String in Java

>> Intersection of Two Lists in Java

>> Introduction to JVM Code Cache

>> BufferedReader vs Console vs Scanner in Java

>> Sorting Arrays in Java

>> Java 8 Predicate Chain

>> Implementing a Custom Lombok Annotation

>> Guide to Java Packages

>> Java 11 String API Additions

>> Java 11 Local Variable Syntax for Lambda Parameters

>> Introduction to Functional Java

>> Java 11 Single File Source Code

>> Java Stream Filter with Lambda Expression

>> Comparing Two HashMaps in Java

>> Connecting Through Proxy Servers in Core Java

>> How to Start a Thread in Java

>> How to Check if Java is Installed

>> Find the Longest Substring without Repeating Characters

>> Java Compound Operators

>> Immutable Map Implementations in Java

>> Formatting Output with printf() in Java

>> Remove Leading and Trailing Characters from a String

>> Guide to Character Encoding

>> Ways to Iterate Over a List in Java

>> Array to String Conversions

>> Join Array of Primitives with Separator in Java

>> Retrieving a Class Name in Java

>> Graphs in Java

>> Java equals() and hashCode() Contracts

>> Java CyclicBarrier vs CountDownLatch

>> Abstract Factory Pattern in Java

>> Removing Repeated Characters from a String

>> Java Interview Questions

>> The Decorator Pattern in Java

>> A Guide to Constructors in Java

>> Remove or Replace part of a String in Java

>> A Guide to the Java Math Class

>> Abstract Classes in Java

>> Convert between String and Timestamp

>> Java Compiler Error: “class, interface, or enum expected”

>> Adding a Newline Character to a String in Java

>> Pad a String with Zeros or Spaces in Java

>> Convert String to Byte Array and Reverse in Java

>> Intersection Between two Integer Arrays

>> Calculate the Area of a Circle in Java

>> How to Replace Many if Statements in Java

>> Deep Dive Into the New Java JIT Compiler – Graal

>> Installing Java on Ubuntu

>> Generate a Secure Random Password in Java

>> Convert Latitude and Longitude to a 2D Point in Java

>> Guide to BufferedReader

>> SSL Handshake Failures

>> Array Operations in Java

>> Print Even and Odd Numbers Using 2 Threads

>> Convert Between java.time.Instant and java.sql.Timestamp

>> Understanding Memory Leaks in Java

>> A Guide to EnumMap

>> Using indexOf to Find All Occurrences of a Word in a String

>> Merging java.util.Properties Objects

>> Lombok Builder with Custom Setter

>> Arrays in Java: A Reference Guide

>> Reading a CSV File into an Array

>> Intro to Apache Storm

>> Lombok Builder with Default Value

>> Removing Elements from Java Collections

>> Format ZonedDateTime to String

>> Introduction to Apache Pulsar

>> A Guide to SimpleDateFormat

>> Converting a Collection to ArrayList in Java

>> An Introduction to SuanShu

>> Heap Sort in Java

>> An Introduction to Synchronized Java Collections

>> Concrete Class in Java

>> The Modulo Operator in Java

>> Maven Error “JAVA_HOME should point to a JDK not a JRE”

>> Java 8 Streams: Find Items From One List Based On Values From Another List

>> Combining Different Types of Collections in Java

>> Converting Between Byte Arrays and Hexadecimal Strings in Java

>> Setting the Java Version in Maven

>> Write an org.w3.dom.Document to a File

>> Guide to EnumSet

>> Guide to DateTimeFormatter

>> How to Use if/else Logic in Java 8 Streams

>> Insertion Sort in Java

>> Guide to Java OutputStream

>> How to Check If a Key Exists in a Map

>> Using Math.sin with Degrees

>> Calculating the nth Root in Java

>> Merging Two Maps with Java 8

>> Quicksort Algorithm Implementation in Java

>> Ternary Operator In Java

>> Calculate Percentage in Java

>> Operating on and Removing an Item from Stream

>> Merge Sort in Java

>> String Performance Hints

>> Introduction to Protonpack

>> Java Switch Statement

>> Finding the Highest Value in a Java Map

>> Sort a HashMap in Java

>> Hashing a Password in Java

>> ZoneOffset in Java

>> How to Separate Double into Integer and Decimal Parts

>> Different Ways to Capture Java Heap Dumps

>> Differences Between Collection.clear() and Collection.removeAll()

>> Guide to java.lang.Process API

>> Convert Double to String, Removing Decimal Places

>> An Introduction to Apache Commons Lang 3

>> Brief Introduction to Java Thread.yield()

>> Get the Key for a Value from a Java Map

>> A Guide to OptaPlanner

>> Using Lombok’s @Getter for Boolean Fields

>> Lombok @Builder with Inheritance

>> Check If Two Rectangles Overlap In Java

>> Permgen vs Metaspace in Java

>> Convert java.util.Date to String

>> Calculate the Distance Between Two Points in Java

>> Remove Emojis from a Java String

>> Synthetic Constructs in Java

>> Time Complexity of Java Collections

>> Add a Character to a String at a Given Position

>> Check If a String Contains All The Letters of The Alphabet with Java

>> Find the Intersection of Two Lines in Java

>> Sorting a String Alphabetically in Java

>> Java Primitives versus Objects

>> Throw Exception in Optional in Java 8

>> Java 9 Platform Logging API

>> Stream Ordering in Java

>> ClassCastException: Arrays$ArrayList cannot be cast to ArrayList

>> Java Check a String for Lowercase/Uppercase Letter, Special Character and Digit

>> Iterate Through a Range of Dates in Java

>> Difference Between Throw and Throws in Java

>> Removing the First Element of an Array

>> Java Constructors vs Static Factory Methods

>> An Overview of Regular Expressions Performance in Java

>> Java List Initialization in One Line

>> Static and Dynamic Binding in Java

>> Differences Between Final, Finally and Finalize in Java

>> Performance of contains() in a HashSet vs ArrayList

>> Read a File into an ArrayList

>> Initialize a HashMap in Java

>> State Design Pattern in Java

>> Collections.emptyList() vs. New List Instance

>> Why String is Immutable in Java?

>> Set the Time Zone of a Date in Java

>> Thread Safe LIFO Data Structure Implementations

>> Remove All Occurrences of a Specific Value from a List

>> java.util.Date vs java.sql.Date

>> Java Null-Safe Streams from Collections

>> Parsing YAML with SnakeYAML

>> How to Filter a Collection in Java

>> Add Multiple Items to an Java ArrayList

>> Remove the First Element from a List

>> Overriding System Time for Testing in Java

>> Guide to Java Instrumentation

>> How to Convert List to Map in Java

>> Getting a File’s Mime Type in Java

>> Initializing HashSet at the Time of Construction

>> Introduction to Micronaut Framework

>> Common Java Exceptions

>> Copy a List to Another List in Java

>> Increment Date in Java

>> Add Hours To a Date In Java

>> Stack Memory and Heap Space in Java

>> Guide to java.util.GregorianCalendar

>> Image to Base64 String Conversion

>> Java Global Exception Handler

>> Create a Symbolic Link with Java

>> Encrypting and Decrypting Files in Java

>> Monitoring Disk Usage and Other Metrics in Java

>> How to Get the Size of an Object in Java

>> Exception Handling in Java

>> Calculate Age in Java

>> Read and Write User Input in Java

>> Introduction to GWT

>> Quick Use of FilenameFilter

>> Iterating Backward Through a List

>> Create a Custom Exception in Java

>> Converting Between Roman and Arabic Numerals in Java

>> Extracting Year, Month and Day from Date in Java

>> How to Get the Start and the End of a Day using Java

>> Importance of Main Manifest Attribute in a Self-Executing JAR

>> Get Date Without Time in Java

>> Java with ANTLR

>> Convert a String to Title Case

>> How to Get the File Extension of a File in Java

>> Java 8 Unsigned Arithmetic Support

>> Immutable Objects in Java

>> Introduction to JavaPoet

>> Introduction to Joda-Time

>> Java System.getProperty vs System.getenv

>> Practical Java Examples of the Big O Notation

>> Implementing a FTP-Client in Java

>> Convert String to Date in Java

>> Find the Middle Element of a Linked List in Java

>> Generalized Target-Type Inference in Java

>> Guide to the java.util.Arrays Class

>> Multi-Dimensional Arrays In Java

>> Java 9 java.lang.Module API

>> Difference Between JVM, JRE, and JDK

>> Method Parameter Reflection in Java

>> The Thread.join() Method in Java

>> Visitor Design Pattern in Java

>> Guide to the super Java Keyword

>> Guide to the this Java Keyword

>> An Introduction to Java.util.Hashtable Class

>> Introduction to Dagger 2

>> Download a File From an URL in Java

>> Optional orElse Optional

>> Getting the Size of an Iterable in Java

>> Infinite Loops in Java

>> Guide to JNI (Java Native Interface)

>> Java main() Method Explained

>> New Features in Java 10

>> NaN in Java

>> Using Lombok’s @Builder Annotation

>> Access Modifiers in Java

>> Variable and Method Hiding in Java

>> Java Optional – orElse() vs orElseGet()

>> Interoperability Between Java and Vavr

>> Java 10 Performance Improvements

>> Java 10 LocalVariable Type-Inference

>> Check If a String Is Numeric in Java

>> Composite Design pattern in Java

>> Lightweight Ethereum Clients Using Web3j

>> The Command Pattern in Java

>> Pass-By-Value as a Parameter Passing Mechanism in Java

>> All About String in Java

>> Java IO Tutorials

>> Java Collections

>> Java Concurrency

>> Java Streams

>> Introduction to AutoFactory

>> Guide to the Java Clock Class

>> Java Service Provider Interface

>> Java Streams vs Vavr Streams

>> Using Java Assertions

>> How to Store Duplicate Keys in a Map in Java?

>> Handling NoClassDefFoundError for JAXBException in Java 9

>> Sending Emails with Java

>> How to Find an Element in a List with Java

>> The State of Java in 2018

>> Java Concurrency Utility with JCTools

>> Introduction to SSL in Java

>> Wrapper Classes in Java

>> Find All Pairs of Numbers in an Array That Add Up to a Given Sum in Java

>> Double-Checked Locking with Singleton

>> Measure Elapsed Time in Java

>> A Guide to Java 9 Modularity

>> Facade Design Pattern in Java

>> Java List UnsupportedOperationException

>> Internationalization and Localization in Java 8

>> Quick Guide to java.lang.System

>> Finding Min/Max in an Array with Java

>> Inheritance and Composition (Is-a vs Has-a relationship) in Java

>> Introduction to JavaFx

>> Class Loaders in Java

>> Introduction to Atlassian Fugue

>> Creating and Deploying Smart Contracts with Solidity

>> Find Sum and Average in a Java Array

>> Handling Daylight Savings Time in Java

>> Java IO – Conversions

>> The “final” Keyword in Java

>> Displaying Money Amounts in Words

>> Java 8 Math New Methods

>> How to Make a Deep Copy of an Object in Java

>> Guide to the Externalizable Interface in Java

>> A Guide to the ResourceBundle

>> ASCII Art in Java

>> How to TDD a List Implementation in Java

>> Guide to Inheritance in Java

>> Method Handles in Java

>> How to Detect the OS Using Java

>> Intro to Google Cloud Storage with Java

>> A Practical Guide to DecimalFormat

>> Object Type Casting in Java

>> Method Overloading and Overriding in Java

>> Comparing Strings in Java

>> Shuffling Collections In Java

>> Life Cycle of a Thread in Java

>> Check if a String is a Palindrome in Java

>> Introduction to ActiveWeb

>> Priority-based Job Scheduling in Java

>> Flyweight Pattern in Java

>> wait and notify() Methods in Java

>> Compiling Java *.class Files with javac

>> Introduction to Javadoc

>> Introduction to Spliterator in Java

>> A Guide to the finalize Method in Java

>> The Trie Data Structure in Java

>> Getting Started with Java RMI

>> Introduction to Java Primitives

>> Weak References in Java

>> Phantom References in Java

>> A Guide to Iterator in Java

>> Introduction to Future in Vavr

>> RegEx for matching Date Pattern in Java

>> How to Find the Kth Largest Element in Java

>> Java TreeMap vs HashMap

>> Java 8 StringJoiner

>> Guide to ThreadLocalRandom in Java

>> A Guide to TreeSet in Java

>> Soft References in Java

>> Overview of Java Built-in Annotations

>> Implementing a Binary Tree in Java

>> Static and Default Methods in Interfaces in Java

>> Fail-Safe Iterator vs Fail-Fast Iterator

>> ExecutorService – Waiting for Threads to Finish

>> A Guide to Creating Objects in Java

>> Guide to the Cipher Class

>> Java 9 Variable Handles Demystified

>> How to Reverse an Array in Java

>> Recursion In Java

>> Primitive Type Streams in Java 8

>> Check if a Java Array Contains a Value

>> Efficient Word Frequency Calculator in Java

>> Batch Processing in JDBC

>> Polymorphism in Java

>> A Guide to Inner Interfaces in Java

>> A Guide to Transactions Across Microservices

>> A Guide to HashSet in Java

>> Varargs in Java

>> Creating a MS PowerPoint Presentation in Java

>> A Guide to Java Loops

>> Nested Classes in Java

>> Introduction to the JDBC RowSet Interface in Java

>> Comparator and Comparable in Java

>> Guide to java.util.Formatter

>> Convert Date to LocalDate or LocalDateTime and Back

>> Implementing the Template Method Pattern in Java

>> Introduction to the Java ArrayDeque

>> Java – Append Data to a File

>> How to Kill a Java Thread

>> How to Copy a File with Java

>> Display All Time Zones With GMT And UTC in Java

>> Introduction to Creational Design Patterns

>> Guide to Java String Pool

>> An Example of Backward Chaining in Drools

>> The Java continue and break Keywords

>> Creating a Java Compiler Plugin

>> Generating Prime Numbers in Java

>> Java String.valueOf()

>> Java String.trim()

>> Java String.toUpperCase()

>> Java String.toLowerCase()

>> Java String.substring()

>> Java String.subSequence()

>> Java String.startsWith()

>> Java String.split()

>> Java String.replaceAll()

>> Java String.replace()

>> Java String.regionMatches()

>> Java String.lastIndexOf()

>> Java String.isEmpty()

>> Java String.intern()

>> Java String.indexOf()

>> Java String.getBytes()

>> Java String.format()

>> Java String.endsWith()

>> Java String.copyValueOf()

>> Java String.contains()

>> Java String.concat()

>> Java String.codePointCount()

>> Java String.String()

>> Implementing a Runnable vs Extending a Thread

>> Java String.charAt()

>> Java String.codePointAt()

>> Daemon Threads in Java

>> Challenges in Java 8

>> Initializing Arrays in Java

>> A Guide to the Static Keyword in Java

>> A Guide to Java Bytecode Manipulation with ASM

>> Bubble Sort in Java

>> Activiti Kickstart App and Activiti Rest Webapp

>> Introduction to Caffeine

>> Introduction to StreamEx

>> ProcessEngine Configuration in Activiti

>> Static Code Analysis in Java

>> Introduction to JGraphT

>> Apache Commons Collections Bag

>> Collection Factory Methods for Vavr

>> Introduction to EthereumJ

>> Introduction to GeoTools

>> Guide to the Diamond Operator in Java

>> “Stream has already been operated upon or closed” Exception in Java

>> Binary Search Algorithm in Java

>> Using Pairs in Java

>> Apache Commons IO

>> Compact Strings in Java 9

>> Test a Linked List for Cyclicity

>> Number of Digits in an Integer in Java

>> Introduction to MBassador

>> StringBuilder vs StringBuffer in Java

>> How to Iterate Over a Stream With Indices

>> Guide to JDeferred

>> Guide to Collections API in Vavr

>> OutOfMemoryError: GC Overhead Limit Exceeded

>> “Sneaky Throws” in Java

>> Delete a Directory Recursively in Java

>> Introduction to Vavr’s Validation API

>> Introduction to javax.measure

>> Singletons in Java

>> Runnable vs. Callable in Java

>> Difference Between Two Dates in Java

>> String Search Algorithms for Large Texts with Java

>> List of Rules Engines in Java

>> CharSequence vs. String in Java

>> Converting a List to String in Java

>> DistinctBy in the Java Stream API

>> Guide to the Volatile Keyword in Java

>> Broadcasting and Multicasting in Java

>> Difference between URL and URI

>> Java 9 java.util.Objects Additions

>> Introduction to Eclipse Collections

>> Introduction to NoException

>> Inject Parameters into JUnit Jupiter Unit Tests

>> Quick Guide to RSS with Rome

>> Collect a Java Stream to an Immutable Collection

>> Guide to hashCode() in Java

>> Apache Commons Chain

>> Introduction to PCollections

>> Guide to Apache Commons CircularFifoQueue

>> A Guide to Activiti with Java

>> Overview of the java.util.concurrent

>> A Guide to Byte Buddy

>> Microbenchmarking with Java

>> Apache Commons Collections MapUtils

>> An Introduction to Atomic Variables in Java

>> Introduction to Vavr’s Either

>> A Guide to Apache Commons Collections CollectionUtils

>> TemporalAdjuster in Java

>> Zipping Collections in Java

>> Apache Commons Collections BidiMap

>> What is the serialVersionUID?

>> Type Erasure in Java Explained

>> Semaphores in Java

>> BigDecimal and BigInteger in Java

>> Introduction to Apache Commons Text

>> Apache Commons Collections OrderedMap

>> Apache Commons Collections SetUtils

>> Exceptions in Lambda Expression Using Vavr

>> CyclicBarrier in Java

>> Iterate over a Map in Java

>> How to Warm Up the JVM

>> How to Get a Name of a Method Being Executed?

>> Locality-Sensitive Hashing in Java Using Java-LSH

>> Introduction to Quartz

>> Changing the Order in a Sum Operation Can Produce Different Results?

>> Converting String to Stream of chars

>> How to Find all Getters Returning Null

>> How to Get All Dates Between Two Dates?

>> Introduction to Netty

>> Changing Annotation Parameters At Runtime

>> Merging Streams in Java

>> How to Round a Number to N Decimal Places in Java

>> Java 9 Reactive Streams

>> The Difference Between map() and flatMap()

>> Java 9 Optional API Additions

>> The Dining Philosophers Problem in Java

>> Guide to Escaping Characters in Java RegExps

>> How to Get the Last Element of a Stream in Java?

>> Guide to UUID in Java

>> ClassNotFoundException vs NoClassDefFoundError

>> Iterating over Enum Values in Java

>> How to Add a Single Element to a Stream

>> Comparing getPath(), getAbsolutePath(), and getCanonicalPath() in Java

>> Software Transactional Memory in Java Using Multiverse

>> Guide to the Synchronized Keyword in Java

>> How to Remove the Last Character of a String?

>> Introduction to Java Serialization

>> Split a String in Java

>> The StackOverflowError in Java

>> Java Double Brace Initialization

>> Count Occurrences of a Char in a String

>> Guide to DelayQueue

>> Guide to the Java Phaser

>> Call Methods at Runtime Using Java Reflection

>> Converting a Stack Trace to a String in Java

>> Period and Duration in Java

>> Guide to CopyOnWriteArrayList

>> Introduction to JDBC

>> How to Copy an Array in Java

>> Dynamic Proxies in Java

>> Using Java MappedByteBuffer

>> Java Annotations Interview Questions (+ Answers)

>> LongAdder and LongAccumulator in Java

>> Difference Between Wait and Sleep in Java

>> Do a Simple HTTP Request in Java

>> Guide to the ConcurrentSkipListMap

>> Guide to the Most Important JVM Parameters

>> HashSet and TreeSet Comparison

>> Guide to the Java TransferQueue

>> A Guide to Java SynchronousQueue

>> Introduction to Apache Commons Math

>> JVM Garbage Collectors

>> Guide to sun.misc.Unsafe

>> Java Exceptions Interview Questions (+ Answers)

>> An Introduction to ThreadLocal in Java

>> Java Flow Control Interview Questions (+ Answers)

>> Quick Guide to the Java StringTokenizer

>> Check If a Number Is Prime in Java

>> Java in 2017 Survey Results

>> Flattening Nested Collections in Java

>> Intro to JaVers

>> Guide to Java 8 Comparator.comparing()

>> A Guide to the Java Web Start

>> Converting Strings to Enums in Java

>> Validating Input with Finite Automata in Java

>> Java Generics Interview Questions (+Answers)

>> Using Math.pow in Java

>> Introduction to Project Jigsaw

>> Introduction to Javassist

>> A Guide to the Java API for WebSocket

>> Guide to Google Guice

>> Java 9 CompletableFuture API Improvements

>> Java Money and the Currency API

>> Introduction to Java 9 StackWalking API

>> Array Processing with Apache Commons Lang 3

>> Java Primitive Conversions

>> Java 9 Process API Improvements

>> Java 9 – Exploring the REPL

>> Introducing nudge4j

>> Introduction to cglib

>> Guide to java.util.concurrent.Locks

>> Introduction to jOOL

>> Finding Max/Min of a List or Collection

>> String Operations with Java Streams

>> Custom Thread Pools In Java 8 Parallel Streams

>> Java 8 and Infinite Streams

>> Guide to WeakHashMap in Java

>> Avoiding the ConcurrentModificationException in Java

>> Guide to Java 8 groupingBy Collector

>> Guide to PriorityBlockingQueue in Java

>> A Guide to ConcurrentMap

>> Guide to Try in Vavr

>> Java Convenience Factory Methods for Collections

>> Guide to java.util.concurrent.Future

>> Guide to Guava Table

>> Memory Management in Java Interview Questions (+Answers)

>> Guide to java.util.concurrent.BlockingQueue

>> Chained Exceptions in Java

>> New Stream Collectors in Java 9

>> Java 8 Interview Questions(+ Answers)

>> Guide to CountDownLatch in Java

>> A Guide to TreeMap in Java

>> Guide to Guava RangeSet

>> Java 8 Stream findFirst() vs. findAny()

>> A Guide to LinkedHashMap in Java

>> Concurrency with LMAX Disruptor – An Introduction

>> Iterable to Stream in Java

>> Exceptions in Java 8 Lambda Expressions

>> Guide to Guava Multimap

>> Guide to Pattern Matching in Vavr

>> Set JAVA_HOME on Windows 7, 8, 10, Mac OS X, Linux

>> Introduction to Nashorn

>> Basic Introduction to JMX

>> Introduction to Vavr

>> The Java HashMap Under the Hood

>> Working with Images in Java

>> Guide to JAXB

>> Differences Between the Java WatchService API and the Apache Commons IO Monitor Library

>> The Traveling Salesman Problem in Java

>> Java – Combine Multiple Collections

>> Designing a User Friendly Java Library

>> Join and Split Arrays and Collections in Java

>> Guide to Java URL Encoding/Decoding

>> File Size in Java

>> The Basics of Java Generics

>> Java Class Structure and Initialization Interview Questions

>> Guide To Java 8 Optional

>> A Guide To NIO2 Asynchronous File Channel

>> A Guide to NIO2 Asynchronous Socket Channel

>> A Guide To NIO2 FileVisitor

>> A Guide To NIO2 File Attribute APIs

>> A Guide to WatchService in Java NIO2

>> Guide to Java NIO2 Asynchronous Channel APIs

>> Sorting in Java

>> Java Concurrency Interview Questions (+ Answers)

>> Java Type System Interview Questions

>> SHA-256 and SHA3-256 Hashing in Java

>> Getting Started with Java Properties

>> Java String Conversions

>> Java 9 Stream API Improvements

>> Guide to the Java 8 forEach

>> A Guide to the Java URL

>> Java Collections Interview Questions

>> Introduction to the Java NIO2 File API

>> Working with Network Interfaces in Java

>> Convert Hex to ASCII in Java

>> Java NIO2 Path API

>> How to Print Screen in Java

>> A Guide To UDP In Java

>> A Guide to the Java LinkedList

>> Introduction to the Java NIO Selector

>> New Features in Java 9

>> Get the Current Date and Time in Java

>> A Guide To Java Regular Expressions API

>> How to Read a File in Java

>> FileNotFoundException in Java

>> Java – Get Random Item/Element From a List

>> Generate equals() and hashCode() with Eclipse

>> Java Annotation Processing and Creating a Builder

>> MD5 Hashing in Java

>> Filtering a Stream of Optionals in Java

>> Guide to the Java ArrayList

>> Guide to Java Reflection

>> Convert String to int or Integer in Java

>> Convert char to String in Java

>> A Guide to Java Sockets

>> Functional Interfaces in Java 8

>> How to Run a Shell Command in Java

>> Guide To CompletableFuture

>> Introduction to Thread Pools in Java

>> Introduction to AutoValue

>> Check If Two Lists are Equal in Java

>> Guide to Java 8’s Collectors

>> A Guide to Spring in Eclipse STS

>> Introduction to the Java 8 Date/Time API

>> XML Libraries Support in Java

>> Migrating to the New Java 8 Date Time API

>> The Java 8 Stream API Tutorial

>> A Guide to Java Enums

>> Intro to XPath with Java

>> New Features in Java 8

>> Introduction to Java 8 Streams

>> Guide to the Fork/Join Framework in Java

>> Java – Byte Array to Writer

>> Zipping and Unzipping in Java

>> Java 8 Adoption in March 2016

>> The “Java and Spring in 2016” Survey

>> A Guide to the Java ExecutorService

>> The Double Colon Operator in Java 8

>> Lambda Expressions and Functional Interfaces: Tips and Best Practices

>> Hiring a Java/Spring Developer to Work With Me On Videos (not open)

>> Java – Try with Resources

>> A Guide to XML in Java

>> JSON in Java

>> Java Base64 Encoding and Decoding

>> Survey Results – Java 8, Spring 4 and Spring Boot Adoption

>> Best Java Sites

>> Java – Directory Size

>> Java Timer

>> Guava – Join and Split Collections

>> Filtering and Transforming Collections in Guava

>> Java – Generate Random String

>> Java – Write to File

>> Java “Back to Basics” Tutorial

>> Java – Write a Reader to File

>> Java – Random Long, Float, Integer and Double

>> Java – Reader to InputStream

>> Java – InputStream to Reader

>> Java – Reader to Byte Array

>> Java – Reader to String

>> Java – File to Reader

>> Java – Byte Array to Reader

>> Java – String to Reader

>> Java – Delete a File

>> Java – Create a File

>> Java – Rename or Move a File

>> Java – Write an InputStream to a File

>> Java – Convert File to InputStream

>> Java Byte Array to InputStream

>> Java InputStream to Byte Array and ByteBuffer

>> Java String to InputStream

>> Removing all duplicates from a List in Java

>> Removing all Nulls from a List in Java

>> Convert a Map to an Array, List or Set in Java

>> Converting Between a List and a Set in Java

>> Converting Between an Array and a Set in Java

>> Converting between an Array and a List in Java

>> Java InputStream to String

>> How to Read a Large File Efficiently with Java

>> Java 8 – Powerful Comparison with Lambdas

>> Immutable ArrayList in Java

>> Jackson – Unmarshall to Collection/Array

>> Partition a List in Java

>> Hamcrest Collections Cookbook

>> Guava Collections Cookbook

  • ↑ Back to Top
res – REST with Spring (eBook) (cat=Java)
opt-in
Building a REST API with Spring 5?
Download the E-book
The Baeldung logo

Courses

  • All Courses
  • All Bulk Courses
  • All Bulk Team Courses
  • The Courses Platform

Series

  • Java “Back to Basics” Tutorial
  • Jackson JSON Tutorial
  • Apache HttpClient Tutorial
  • REST with Spring Tutorial
  • Spring Persistence Tutorial
  • Security with Spring
  • Spring Reactive Tutorials

About

  • About Baeldung
  • The Full Archive
  • Editors
  • Jobs
  • Our Partners
  • Partner with Baeldung
  • Terms of Service
  • Privacy Policy
  • Company Info
  • Contact
The Baeldung Logo