“Core Java” is Sun’s term, used to refer to Java SE, the standard edition and a set of related technologies, like the Java VM, CORBA, etc. This is mostly to differentiate from others like Java ME or Java EE. “Core Java” is Oracle’s definition and refers to subset of Java SE technologies.
The Core Java technologies and application programming interfaces (APIs) are the foundation of the Java Platform, Standard Edition (Java SE). They are used in all classes of Java programming, from desktop applications to Java EE applications.
Related Tags
Tutorials
SimpleDateFormat is lenient by default, so parse() turns 02/30/2026 into March 2 without an error. Call setLenient(false) for strict date validation, and add a ParsePosition and round-trip check for the inputs strict mode still accepts.
Convert decimal to hexadecimal by hand with worked examples, and in Java with Integer.toHexString(), String.format() and HexFormat. Also covers hex to decimal, negative numbers and invalid input.
To sort a Java Stream or List that contains null values, wrap the comparator in Comparator.nullsFirst() or nullsLast(). Examples for null elements, null fields, descending order and the reversed() trap.
A Java tutorial for beginners on Java 25, the current LTS release. Install JDK 25, write a first program as a compact source file and as a classic class, add a JUnit 6 test, and follow a 12-step learning path to the best howtodoinjava tutorials for each topic.
A Java enum is a class with a fixed set of named constants. Learn how to add constructors, string values and methods to enum constants, and how to use them with switch, EnumSet and EnumMap.
To find the max value in a Java HashMap, stream its entrySet() and call max(Map.Entry.comparingByValue()) to get the key and the value together. Learn the min value, ties, empty maps and null values too.
To convert a date and time to EST in Java, convert it to a ZonedDateTime in America/New_York, which switches between EST (UTC-5) and EDT (UTC-4). Learn why the EST zone ID gives the wrong hour, how EST5EDT differs and how to print EST, EDT or ET.
To read a file into a String in Java, call Files.readString(path) on Java 11+, or new String(Files.readAllBytes(path), UTF_8) on Java 7 and 8. Examples for Files.lines(), BufferedReader, Commons IO and Guava, plus charset and error handling.
The current working directory in Java is the folder where the java command started. Read it with System.getProperty(“user.dir”) or Path.of(“”).toAbsolutePath().
A Java priority queue (java.util.PriorityQueue) always returns the smallest element first, or the first element by a Comparator. Learn natural and custom order, max-heaps, ties and why a printed queue looks unsorted.
Java has no built-in tuple type. Learn how to group values with a record, Map.entry(), Commons Lang Pair and Triple, and the javatuples classes Pair to Decade.
Replace an element in a Java ArrayList with set(index, element), which returns the old element. Find the index by value with indexOf(), replace all matches with Collections.replaceAll() or List.replaceAll(), and avoid IndexOutOfBoundsException.
Get the first and last day of a week, month or year in Java by passing a TemporalAdjusters method such as firstDayOfMonth() or lastDayOfYear() to LocalDate.with(). Learn how the week start changes by locale, and how to use YearMonth, quarters and range queries.
Compare two dates in Java with isBefore(), isAfter() and isEqual() on LocalDate, LocalDateTime, ZonedDateTime or Instant, and with before(), after() and compareTo() on Date and Calendar. Learn to compare without time, check a date range and sort dates.
UnsupportedOperationException is an unchecked exception that lists from Arrays.asList(), List.of() or Stream.toList() throw when the code changes them. Learn the causes, how to read the stack trace and how to fix it with a modifiable copy.
A case-insensitive map in Java treats String keys such as “Lokesh” and “LOKESH” as the same key. Create one with a TreeMap and String.CASE_INSENSITIVE_ORDER, Apache Commons CaseInsensitiveMap or Spring LinkedCaseInsensitiveMap.
PECS (Producer Extends, Consumer Super) tells us when to use extends T> and when to use super T> on a generic parameter. Learn the rule with compile errors, a copy() method and the JDK methods that follow it.
A module import declaration such as import module java.base; imports every package a module exports with one line, and it is final in Java 25. Learn what it imports, how to fix “reference to List is ambiguous” with a single-type import, and how it works with java.se and compact source files.
java.lang.NoSuchMethodError means code compiled against one version of a class runs with another version that lacks the called method. Learn to read the message, find the wrong jar with mvn dependency:tree, -verbose:class and javap, and fix the conflict with a BOM, an exclusion and the Enforcer dependencyConvergence rule.
A StackOverflowError means a thread made more nested calls than its stack can hold. Learn to read the repeating stack trace, fix missing base cases, deep recursion and object cycles in toString(), Lombok and Jackson, and when -Xss helps.
IllegalArgumentException is the unchecked exception a Java method throws when an argument has a value it does not accept. This post lists the JDK calls that throw it with their real Java 25 messages and the fix for each, the subclasses such as NumberFormatException, and when our own code should throw it instead of IllegalStateException or NullPointerException.
A CompletableFuture is a Future that runs the next step when its result arrives, so no thread has to wait for it. This tutorial creates, chains and combines CompletableFuture tasks on virtual threads, handles errors and timeouts, and shows the mistakes that make async code hang or lose exceptions.
A Java 25 migration is mostly a build change. This step-by-step guide upgrades a Maven project from Java 21 to Java 25, shows the support dates, and fixes the real errors from Lombok, Mockito and JaCoCo on the way.
Java 25 is the LTS release of September 2025 with 18 JEPs. This guide runs every one of them, from compact source files, module imports, flexible constructors and scoped values to compact object headers, AOT caches and the new JFR events, and shows the preview features with their –enable-preview flags. It ends with the features that became final between Java 21 and 25 and a migration checklist.
Java 26 (JDK 26) shipped on 17 March 2026 as a non-LTS release with 10 JEPs. This overview lists every JEP with its status and shows short, runnable examples for HTTP/3, final field warnings, the AOT cache with ZGC and the preview APIs.
Java 27 (JDK 27) reached general availability on 15 September 2026 with nine JEPs. Four final JEPs change JVM defaults (G1 everywhere, compact object headers, post-quantum TLS, JFR redaction), and five continue as previews or incubator. A summary table, one example per feature and the removed options.
Initialize a Java List in one line with List.of() for an unmodifiable list, or new ArrayList<>(List.of(…)) when the list changes later. Compare Arrays.asList(), Stream.toList(), Collections and Guava by mutability and null support.
“Unsupported class file major version 69” means a JVM or bytecode tool older than Java 25 tried to read a Java 25 class file. Learn to read the class file version, map it to the Java release, and fix the error by upgrading the runtime, compiling with –release, or upgrading Gradle, Spring, JaCoCo, Mockito and Lombok.
Connect Spring Boot 4.1 to Elasticsearch 9 with Spring Data Elasticsearch 6.1 and the new Java client: run Elasticsearch in Docker, map documents, search with repositories and NativeQuery, and test with Testcontainers.
A hands-on Kubernetes guide for Java developers: deploy a Spring Boot API and PostgreSQL to a local kind cluster and learn pods, Deployments, Services, Ingress, ConfigMaps, Secrets, volumes and StatefulSets with real kubectl output.
Upload an .xlsx class roster to a Spring Boot endpoint, read it with Apache POI, validate every row with Bean Validation and save the valid rows in JDBC batches. Includes a JSON error report, duplicate checks, a SAX reader for large files with measured heap, upload limits and MockMvc tests.
Set up Hibernate 7.4 in a Spring Boot 4.1 application: the JPA starter, datasource and JPA properties, entities, Spring Data repositories, transactions, the Session API, SQL logging, tests on H2 and MySQL, and the Hibernate 7 upgrade changes.
One property, spring.threads.virtual.enabled=true, moves Spring Boot requests, @Async methods and scheduled tasks to virtual threads. A weather API measured against platform threads and WebFlux, plus pinning and monitoring on Java 25.
A shared Random is thread-safe but makes every thread fight over one seed. Learn which generator each thread should use, how to keep seeded results reproducible, and what a JMH benchmark measured on Java 25.
The error “java.lang.IllegalArgumentException: Failed to create folder” in Selenide typically happens when Selenide tries to save screenshots, page sources, or logs, but it cannot create the required directories due to permission issues or incorrect paths.
In-browser UI testing of Angular applications poses several challenges such as asynchronous operations and unpredictable loading screens with spinners or dimmers.
Selenide has an implicit capability to wait for the loading screen to disappear.
OpenHTMLToPDF library generates PDF from HTML and CSS content taken from templates such as HTML file, Freemarker and Thymeleaf templates.
As a best practice in Java, POJO classes or Data objects always declare the fields private and expose their access through the getter methods. On rare occasions, we may encounter situations when the member fields are private, and the class does not provide the public accessor methods. For example, the …
Learn to create an immutable or unmodifiable Map using the factory methods added in Java 9 and other versions (Java 8 to Java 21) with examples.
In Java, we can serialize an object to String in different ways such as converting to byte[] and thenBase64 encoded string, XML or JSON. Learn with examples.
Added in Java 21, the Executors.newVirtualThreadPerTaskExecutor() method returns an Executor that creates a new virtual thread for each task submitted to it.
Learn to filter a Map by keys or values or both, using the Java 8 Stream filter() and collect() methods with examples.
Learn to create a Java Stream utility class with contains(), containsAll() or containsAny() methods and learn to use them with examples.
Java Stream API provides excellent filtering capability on the elements in the Stream. Sometimes, the stream elements also contain the nested collections; we need to filter those elements in the nested collections. This Java tutorial discusses various approaches with examples to apply filtering on nested collections and collecting the filtered …
Stream mapMulti() is a specialized form of the map() method that transforms each element of a stream into one or multiple output elements or none at all.
Learn to use Java 8 LocalDate and TemporalAdjusters class to get the first and the last day of the current week, month or year with examples.
This short Java tutorial lists two ready-to-use snippets for invoking the default methods in an interface without implementing the interface in a class.
In Java, an identity string is a unique identifier associated with an object instance without calling the overridden toString() or hashCode() methods.
Since Java 8, the java.util.Base64 class provides convenient methods for encoding and decoding files such as text, image, JSON files.
Learn to initialize Java HashMap object in different ways such as empty map, pre-populated map, and collecting stream elements into the map.