Java Articles, Tutorials & News

Sealed Classes Preview in Java 15

The release of Java SE 15 in Sept 2020 will introduce “sealed classes” (JEP 360) as a preview feature. A sealed class is a class or interface which restricts which other classes or interfaces may extend it. Sealed classes, like enums, capture alternative…

Read more »

Java.util.Scanner Class

Java.util package provides a Scanner class. A simple text scanner parse primitive types and strings using regular expressions. A Scanner breaks its input into tokens using a delimiter pattern, which by default matches whitespace. The resulting tokens may …

Read more »