Home » Java » Core Java » Page 11

Core Java

Java14: Join Database Tables with Java 14’s new Record

Did you know that you can join database tables into a Java Stream with Java 14’s preview record feature? Read this short article and find out how it is done using the  Speedment Stream ORM. We will start with how to set up your project. Setup Download Java 14. Go to the Speedment Initializer and download your project skelaton (including ...

Read More »

JDK 14/JEP 305 instanceof Pattern Matching “Smart Casts”

I generally view the presence of the instanceof operator in Java code as a “red flag,” meaning that it’s not necessarily wrong to use instanceof in certain situations, but its use sometimes indicates a design issue that could be resolved in a cleaner way as described in some resources referenced at the end of this post (including resources about similar ...

Read More »

Java – Missing font – Crashing App!

Eclipse MAT,  Heaphero are all popular java tools to analyze large size heap dumps. Recently we ran in to an interesting problem when trying to analyze a heap dump file in Eclipse MAT. Tool was crashing because of missing font 😊. We thought we will share with you what we found out. ArrayIndexOutOfBoundsException  in CompositeStrike.getStrikeForSlot() Here is our environment: Eclipse ...

Read More »

Set Visual Studio Code as default editor in jshell

Java Shell (jshell) is an interactive tool for learning and prototyping in Java. It was introduced with Java 9 and since then I use it ocassionally either for some quick prototyping, during presentations or simply to verify new features in the Java language. Since jshell is a command line tool (with basic intellisense) editing files in jshell is not the ...

Read More »

How to use regular expression in Java?

Regular expressions are very important tool for seraching in text. Below is the code snippet for executing regex search and capturing different parts of the string based on the regular expression 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ...

Read More »

OpenJDK Loom and Structured Concurrency

Project Loom is one of the projects sponsored by the Hotspot Group, initiated to deliver high throughput and lightweight concurrency model into the JAVA world. At the time of writing this post, project Loom is still under active development and its API might change. Why Loom? The first question that might and should pop up for every new project is ...

Read More »

Java Code Geeks are giving away a FREE Sublime Text Editor License via Twitter

Struggling with your heavy-weight editor? Then we have something especially for you! We are running a contest giving away a FREE license for the kick-ass Sublime Text Editor. Sublime Text is a sophisticated text editor for code, markup and prose. You’ll love the slick user interface, extraordinary features and amazing performance! Sublime Text is available for OS X, Windows and ...

Read More »