“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
Learn about various data types in Java. Learn the differences between primitive datatypes and non-primitive datatypes (or reference datatypes). We will also learn about the data types sizes and best practices for using datatypes in Java. 1. How to Declare a Variable in Java? In Java, typically datatypes are associated …
Java is concurrent, object-oriented, and intended to let application developers “write once, run anywhere” (WORA). Java is considered a fast language, almost as fast as languages like C and Rust, but it uses a lot of memory in comparison to these languages. 1. What is Java Programming Language Java is …
All the values in Java are divided into two categories: reference types and primitive types. Learn about eight Java primitive data types.
One of the benefits of the Java executor framework is that we can run concurrent tasks that may return a single result after processing the tasks. The Java Concurrency API achieves this with the following two interfaces Callable and Future. In this tutorial, we will learn to execute Callable tasks …
In previous tutorial, we learned about basic thread pool executor with unlimited possible number of threads into the pool and it’s example usage. Now lets look example of fixed size thread pool executor which will help in improved performance and better system resource utilization by limiting the maximum number of …
Why do we need a thread pool in Java? The answer is when we develop a simple, concurrent application in Java, we create some Runnable objects and then create the corresponding Thread objects to execute them. Creating a thread in Java is an expensive operation. And if you start creating …
In java, most used data structure is probably a list. A list has an undetermined number of elements and you can add, read, or remove the element of any position. Additionally, concurrent lists allow the various threads to add or remove elements in the list at a time without producing …
1. Problem If you are facing this error after importing an existing maven project into your eclipse IDE, then it means that http-servlet is not available in the project’s classpath and you must include it. The error looks like this. 2. Solution To include http-servlet into your classpath, you have …
Learn to copy a directory into a new location in Java. Learn to apply FileFilter to include or exclude subdirectories and specific files.
A checksum hash is an encrypted sequence of characters obtained after applying specific algorithms and manipulations on user-provided content. In this Java hashing tutorial, we will learn to generate the checksum hash for the files. 1. Why Generate a File’s Checksum? Any serious file provider provides a mechanism to have …
Learn to make a file read-only in Java. A read-only file can be opened for reading, but we cannot modify or delete the file contents.
Copying a file from one place to another in Java is a common task. Learn to copy files using Java NIO, Commons-IO and Guava APIs.
Learn to use the Java FilenameFilter to traverse a directory and search all files with names matching a specified pattern.
Learn to create BufferedWriter with default, configure custom internal buffer sizes and write characters data into a file using it.
Learn to create and operate the BufferedReader instance, set default buffer size and read from a file and system console with examples.
Learn to create a new file using different techniques including NIO Files and Path, IO File, File OutputStream, and open-source libraries.
When using FileChannel transferTo() and transferFrom() methods, data doesn’t pass through the Java heap, thus reducing garbage collection pressure.
Learn about Java memory-mapped files and learn to read and write content from a memory mapped file with the help of RandomAccessFile and MemoryMappedBuffer. 1. Java Memory-mapped IO If you know how java IO works at lower level, then you will be aware of buffer handling, memory paging and other …
Java NIO Channels provide an important new capability known as scatter/gather (referred to in some circles as vectored I/O). Scatter/gather is a simple yet powerful concept. Scatter/gather is a technique through which bytes can be read from a stream into a set of buffers (vectors) with a single read() invocation …
Channels are the second major addition to java.nio after buffers which we have learned in my previous tutorial in detail. Channels provide direct connection to the I/O services. A Channel is a medium that transports data efficiently between byte buffers and the entity on the other end of the channel …
Java Buffer classes are the foundation upon which java.nio is built. In this tutorial, we will take a closer look at the buffers. We will discover the various buffer types, and learn how to use them. We’ll then see how the java.nio buffers relate to the Channel classes of java.nio.channels. …
In concurrent programming, a semaphore is a synchronization aid that manages access to a shared resource by multiple threads.
The Object class in Java has three final methods that allow threads to communicate i.e. wait(), notify() and notifyAll(). Learn how to use these methods.
A binary semaphore is a synchronization primitive that can hold only two values, typically 0 and 1. We use binary semaphore to manage access to a shared resource by multiple threads in a concurrent environment. Conceptually, a binary semaphore can be thought of as a lock that allows only one …
Java provides another mechanism for the synchronization of blocks of code based on the Lock interface and classes that implement it (such as ReentrantLock). In this tutorial, we will see a basic usage of Lock interface to solve printer queue problem. 1. Lock Interface A java.util.concurrent.locks.Lock is a thread synchronization …
The factory design pattern is one of the most used design patterns in the java. It is one of creational patterns and can be used to develop an object in demand of one or several classes. With this factory, we centralize the creation of objects. The centralization of creation logic …
Today, one of the most critical aspects of a concurrent application is shared data. When you create a thread that implements the Runnable interface and then starts various Thread objects using the same Runnable object. All the threads share the same attributes that are defined inside the runnable object. This …
1. UncaughtExceptionHandler Java applications have two kind of exceptions – checked exceptions and unchecked exceptions. Checked exceptions must be specified in the throws clause of a method or caught inside them. Unchecked exceptions don’t have to be specified or caught. When a checked exception is thrown inside the run() method …
Learn how Java IO operations are mapped at the machine level; and what all things the hardware does all the time when application is running.
Servlets are Java classes that conform to the Java Servlet API, which allows a Java class to respond to requests. Although servlets can respond to any type of request, they are most commonly written to respond to web-based requests. A servlet must be deployed to a Java servlet container in …
Learn to setup PowerMock with Mockito and JUnit; test private, static and final methods in the classes and verify method invocation counts.
In this java regular expression tutorial, we will learn to use regex to validate credit card numbers. We will learn about number format and validations of credit card numbers from multiple providers such as VISA, Mastercard, Amex and Diners etc. 1. Valid Credit Card Numbers Formats On an actual credit …
Learn to use regular expressions for UK postcode validation in Java. You can modify the regex to suit it for any other format such as US postal codes.
Learn to use regular expressions for Canada postal code validation. Also learn the rules which must be applied to a valid canadian postal zip code.
Learn to use regular expressions for US zip code validation in Java. Also learn the regex rules to check a valid USA postal code.
Learn to use regular expressions to test whether a user has entered a valid International Standard Book Number (ISBN).
In this Java regex tutorial, we will learn to use regular expressions to test whether a user has entered a valid Social Security number in your application or website form. 1. Valid SSN Pattern United States Social Security numbers are nine-digit numbers in the format AAA-GG-SSSS with the following rules. …
In this Java regex tutorial, we will learn to test whether several lines in input text are between some minimum and maximum limit, without regard for how many total characters appear in the string. The regex for matching the number of lines will depend on the exact characters or character …
In this Java regex tutorial, we will learn to test whether the number of words in input text is within a certain minimum and maximum limit.
In this java regex tutorial, we will learn to test whether the length of input text is between some minimum and maximum limit.
To create a regular expression that allows only alphanumeric characters, we can use the regex pattern ^[a-zA-Z0-9]+$. This pattern ensures that the string consists solely of uppercase alphabets, lowercase alphabets, and digits. Alphanumeric characters are all alphabets and numbers i.e. letters A–Z, a–z, and digits 0–9. 1. Alphanumeric Regex Pattern …
You will get this exception message when you are trying to use named groups in java regex validation or matching. Root Cause of No match found Error in Regex Named Group Matching Error log will show the message like below: Solution You are probably not using “matcher.matches()” before fetching the …
In this Java date validation using regex, we will learn to validate simple date formats such as mm/dd/yy, mm/dd/yyyy, dd/mm/yy and dd/mm/yyyy. Here we want to use a regex that simply checks whether the input is a valid date without trying to eliminate things such as February 31st. We might …
In this regex tutorial, we will learn to validate international phone numbers based on industry-standard notation specified by ITU-T E.123. The rules and conventions used to print international phone numbers vary significantly around the world, so it’s hard to provide meaningful validation for an international phone number unless you adopt …
In this regex tutorial, we will learn to validate user-entered phone numbers for a specific format (in this example phone numbers are formatted in North American format) and if the numbers are correct then reformat them to a standard format for display. I have tested formats including 1234567890, 123-456-7890, 123.456.7890, …
Simple Java email validation example. Learn to validate email in Java using regular expressions. Five different regex patterns for email validation.
In this Java regular expression tutorial, we will learn to match any character which is part of “Greek Extended” unicode block or Greek script.
In this Java regex tutorial, learn to match all available currency symbols, e.g. $ Dollar, € Euro, ¥ Yen, in a String in Java.
In this Java regex example, we will learn to match trademark symbol ™ in a string using the regular expression.
Java regex word boundary example to match specific word or check if string contain word using Java regular expressions. java regex contain word example. java regex match specific word example.