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 » Core 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.

  • x 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 Javac and the Eclipse Compiler

>> Implementing toString() on enums in Java

>> Different Ways to Create an Object in Java

>> VarArgs vs Array Input Parameters 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()

>> Check if Object Is an Array in Java

>> Record vs. Final Class in Java

>> Callback Functions in Java

>> Initialize an ArrayList with Zeroes or Null in Java

>> Memory Types in JVM

>> Determine if a Class Implements an Interface in Java

>> 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

>> Check if Command-Line Arguments Are Null 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

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

>> Lambda Expression vs. Anonymous Inner Class

>> Case-Insensitive Searching in ArrayList

>> Class Methods vs Instance Methods in Java

>> Getting Class Type From a String in Java

>> PrintStream vs PrintWriter in Java

>> When to Use Callable and Supplier in Java

>> Convert Between int and char in Java

>> Alternatives for instanceof Operator in Java

>> Convert Anonymous Class into Lambda in Java

>> Type Parameter vs Wildcard in Java Generics

>> Errors and Exceptions in Java

>> 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

>> Calling JMX MBean Method From a Shell Script

>> Sort Collection of Objects by Multiple Fields in Java

>> Retain Only Digits and Decimal Separator in String

>> Finding Max Date in List Using Streams

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

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

>> Coupling in Java

>> Difference Between Java Enumeration and Iterator

>> Java Literals

>> Infinity in Java

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

>> Convert a List to a Comma-Separated String

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

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

>> Handle Classes With the Same Name in Java

>> Compare Characters in Java

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

>> Static vs. Instance Initializer Block in Java

>> Advantages and Disadvantages of Using Java Wildcard Imports

>> Use Cases for Static Methods in Java

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

>> Is There a Destructor in Java?

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

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

>> Convert boolean to int in Java

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

>> The for-each Loop in Java

>> Java Operators

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

>> Constructor Specification in Java

>> Java Classpath Syntax in Linux vs. Windows

>> Serialization Validation in Java

>> Chaining Constructors in Java

>> Pattern Matching for Switch

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

>> Throwing Exceptions in Constructors

>> Private Constructors in Java

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

>> Deserialization Vulnerabilities in Java

>> Using an Interface vs. Abstract Class in Java

>> Java Class File Naming Conventions

>> The Java final Keyword – Impact on Performance

>> Java Warning “Unchecked Cast”

>> Guide to Implementing the compareTo Method

>> Java Warning “unchecked conversion”

>> Structural Patterns in Core Java

>> Behavioral Patterns in Core Java

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

>> Understanding the & 0xff Value in Java

>> Creational Design Patterns in Core Java

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

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

>> Determine if an Object is of Primitive Type

>> Convert an Array of Primitives to a List

>> Why are Local Variables Thread-Safe in Java

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

>> Comparing Objects in Java

>> Guide to the Number Class in Java

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

>> The Java Headless Mode

>> New Features in Java 13

>> Bitwise & vs Logical && Operators

>> Using the Not Operator in If Conditions in Java

>> Java Scanner

>> Get Substring from String in Java

>> Find the Smallest Missing Integer in an Array

>> Converting Java Date to OffsetDateTime

>> Java ‘protected’ Access Modifier

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

>> Searching for a String in an ArrayList

>> Methods in Java

>> Comparing Dates in Java

>> Create a File in a Specific Directory in Java

>> Guide to System.gc()

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

>> Java Copy Constructor

>> Java ‘private’ Access Modifier

>> Java ‘public’ Access Modifier

>> Parsing an XML File Using StAX

>> The XOR Operator in Java

>> Evaluation of Methods References in Java

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

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

>> Design Strategies for Decoupling Java Modules

>> Negate a Predicate Method Reference with Java 11

>> Void Type in Java

>> Extending an Array’s Length

>> Generic Constructors in Java

>> Anonymous Classes in Java

>> Introduction to Project Amber

>> Currying in Java

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

>> Creating a Custom Annotation in Java

>> Marker Interfaces in Java

>> Method References in Java

>> Java Classes and Objects

>> Java Bitwise Operators

>> Convert a Float to a Byte Array in Java

>> Variable Scope in Java

>> Retrieve Fields from a Java Class Using Reflection

>> Summing Numbers with Java Streams

>> How to Write to a CSV File in Java

>> Java instanceof Operator

>> Attaching Values to Java Enum

>> Guide to the Java Queue Interface

>> Java toString() Method

>> Java Interfaces

>> Control Structures in Java

>> Java @SafeVarargs Annotation

>> Java @Deprecated Annotation

>> Java @SuppressWarnings Annotation

>> Java @Override Annotation

>> If-Else Statement in Java

>> BufferedReader vs Console vs Scanner in Java

>> Guide to Java Packages

>> How to Check if Java is Installed

>> Java Compound Operators

>> Formatting Output with printf() in Java

>> Guide to Character Encoding

>> Join Array of Primitives with Separator in Java

>> Retrieving a Class Name in Java

>> Java equals() and hashCode() Contracts

>> A Guide to Constructors in Java

>> A Guide to the Java Math Class

>> Abstract Classes in Java

>> Concrete Class in Java

>> The Modulo Operator in Java

>> Insertion Sort in Java

>> Calculating the nth Root in Java

>> Ternary Operator In Java

>> Java Switch Statement

>> Brief Introduction to Java Thread.yield()

>> Synthetic Constructs in Java

>> Java Primitives versus Objects

>> Java 9 Platform Logging API

>> Difference Between Throw and Throws in Java

>> Java Constructors vs Static Factory Methods

>> Static and Dynamic Binding in Java

>> Why String is Immutable in Java?

>> Common Java Exceptions

>> Stack Memory and Heap Space in Java

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

>> Exception Handling in Java

>> Read and Write User Input in Java

>> Create a Custom Exception in Java

>> Immutable Objects in Java

>> Difference Between JVM, JRE, and JDK

>> Guide to the super Java Keyword

>> Guide to the this Java Keyword

>> Infinite Loops in Java

>> Java main() Method Explained

>> Access Modifiers in Java

>> Variable and Method Hiding in Java

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

>> Wrapper Classes in Java

>> Quick Guide to java.lang.System

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

>> Class Loaders in Java

>> The “final” Keyword in Java

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

>> Guide to the Externalizable Interface in Java

>> Guide to Inheritance in Java

>> Object Type Casting in Java

>> Method Overloading and Overriding in Java

>> Compiling Java *.class Files with javac

>> Introduction to Javadoc

>> A Guide to the finalize Method in Java

>> Introduction to Java Primitives

>> Overview of Java Built-in Annotations

>> A Guide to Creating Objects in Java

>> Recursion In Java

>> Polymorphism in Java

>> Varargs in Java

>> A Guide to Java Loops

>> Nested Classes in Java

>> Comparator and Comparable in Java

>> Guide to Java String Pool

>> The Java continue and break Keywords

>> A Guide to the Static Keyword in Java

>> Guide to the Diamond Operator in Java

>> Singletons in Java

>> Guide to hashCode() in Java

>> What is the serialVersionUID?

>> Type Erasure in Java Explained

>> BigDecimal and BigInteger in Java

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

>> Changing Annotation Parameters At Runtime

>> Guide to Escaping Characters in Java RegExps

>> Guide to UUID in Java

>> Iterating over Enum Values in Java

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

>> Introduction to Java Serialization

>> The StackOverflowError in Java

>> Java Double Brace Initialization

>> Call Methods at Runtime Using Java Reflection

>> Converting a Stack Trace to a String in Java

>> Using Math.pow in Java

>> Array Processing with Apache Commons Lang 3

>> Java Primitive Conversions

>> The Basics of Java Generics

>> Getting Started with Java Properties

>> A Guide to Java Enums

>> Java – Try with Resources

>> Java Timer

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

  • ↑ 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

Follow the Java Category

Follow the Java category to get regular info about the new articles and tutorials we publish here.