Core Java APIs and programming techniques
Technologies related to Java APIs (application programming interfaces) and JDK (Java Development Kit) form the cornerstone of modern, enterprise-grade software development. Here we explore all the Java features that make the JVM great through programming tutorials, real-world code samples and expert opinions from Java champions.
Top Stories
-
Video
19 Jul 2024
GET vs. POST: What's the difference?
POST and GET are the two most-used RESTful HTTP methods. But how well versed are you on the differences between them? Continue Reading
-
Video
18 Jul 2024
How to apply the Liskov substitution principle in Java
The Liskov substitution principle is often mistaken for polymorphism and inheritance. To really understand the SOLID LSP, you must understand the nuance and distinction. Continue Reading
-
Video
17 Jul 2024
How to install MySQL on Windows
Need a well-maintained, open-source, standards-based database to test your Java apps and Spring Boot microservices? Here's how to download and install the MySQL Community Edition. Continue Reading
-
Tutorial
12 Jul 2024
Using generics in Typescript: An in-depth tutorial
Generic variables give the TypeScript language versatility and compile-time type safety that put it on par with Java, C# and C++. These examples show how to use TypeScript generics. Continue Reading
-
Video
09 Jul 2024
Python's GIL removal is a poison pill and benefits Mojo
Developers have pleaded for 30 years for the stewards of the language to remove Python's GIL. If they do it now, it will be the end of Python. Continue Reading
-
Tip
03 Jul 2024
Top benefits of the Zig programming language
Does the world really need another programming language? Yes, say developers behind Zig. Here are five of the top features Zig brings to the programming world. Continue Reading
-
Tip
03 Jul 2024
How to use parallel streams in Java with virtual threads
Virtual threads in Java currently lack integration with the stream API, particularly for parallel streams. Here's how a JDK 22 preview feature addresses the problem. Continue Reading
-
Video
20 Jun 2024
No-GIL Python is a mistake
Python's GIL is slated for the chopping block, and while the promise is improved performance, the reality of removing the GIL may be quite different. Continue Reading
-
Blog Post
18 Jun 2024
Code a tic-tac-toe game in Java
The best way to learn to code? Code up some fun games from your childhood. Here's how to code the popular tic-tac-toe game in Java. Continue Reading
-
Tip
14 Jun 2024
ORM vs. SQL: When to use each
Object relational mapping and raw SQL are two different ways to interact with relational databases. Learn when to use each of the two methods and when using both is appropriate. Continue Reading
-
Tip
10 Jun 2024
5 Java ORM tools to know
ORMs are a popular method for connecting to databases from Java. Consider the tradeoffs of these ORM tools to decide which tool to run with. Continue Reading
-
Tip
05 Jun 2024
Advanced Java pattern matching techniques, with examples
Dive deeper into Java pattern matching techniques with these examples that range from nested records to type inference, variables and generics. Continue Reading
-
Video
30 May 2024
Constructor overloading in Java
Not every language supports method overloading, but Java always has. Here's how to perform constructor overloading in Java. Continue Reading
-
Tip
28 May 2024
4 distributed ledger technology risks and how to solve them
Ready to use distributed ledger technologies for smart contracts or other transactions? Know what risks to avoid and overcome to maximize these platforms for your organization. Continue Reading
-
Tip
23 May 2024
Introduction to pattern matching in Java
Pattern matching in Java helps developers better describe data structures and avoid runtime errors, while making code more readable and easier to maintain. Here's how it works. Continue Reading
-
Tip
10 May 2024
An introduction to the RESTful API Modeling Language (RAML)
The RESTful API Modeling Language, or RAML, can be a powerful tool for developers looking to create an efficient, standardized API management strategy. Continue Reading
-
Video
10 May 2024
Java records tutorial
Java is constantly evolving, but some changes are more significant than others. This Java records tutorial teaches you about this decade's largest language enhancement to date. Continue Reading
-
Video
01 May 2024
Java's default constructor tutorial
They say you don't get anything for free, but in the world of software development, Java developers can use the default constructor without paying any price. Continue Reading
-
Tip
01 May 2024
Use sealed classes in Java to control your inheritance
Need to limit the number of possible subclasses in your codebase? Here comes Java's sealed classes to your rescue. Continue Reading
-
Tip
29 Apr 2024
Know how and when to use blockchain vs. distributed ledgers
Blockchain and distributed ledgers are similar but not quite synonymous. Learn their differences and how they are used, including together, for transactions and data storage. Continue Reading
-
Tip
11 Apr 2024
Speed up Python and NumPy by avoiding the conversion tax
Data and memory transfers in Python come with a hidden performance tax. Here's how to use NumPy for optimal performance by avoiding jumps across a hidden line of conversions. Continue Reading
-
Tip
09 Apr 2024
5 code refactoring patterns, with examples
First-time finished code is rarely elegant or maintainable. Refactoring helps keep a growing codebase maintainable and extendable over time -- as long as you know where to stop. Continue Reading
-
Video
09 Apr 2024
Top REST API URL naming convention standards
There is no official REST URL naming standard. However, these 15 RESTful API naming conventions will help you create highly interoperable web services. Continue Reading
-
Blog Post
08 Apr 2024
Worlds toughest core Java interview question
The trickiest Java interview question ever asked? In five words or less, explain the red 'x' the Eclipse IDE displays at the end of the provided Java code snippet. Continue Reading
-
Video
04 Apr 2024
10 constructor types in Java
How many different types of Java constructors could you name? The Java spec names 10. Generic, canonical and anonymous Java constructor types just might be new to you. Continue Reading
-
Video
04 Apr 2024
How Java 17 records work
Devs aren't using Java 17 records nearly enough. With the power to clean up your code and make your apps faster, Java records should be the norm and not the exception. Continue Reading
-
Video
01 Apr 2024
How to use Git's 'set upstream push' command
Need to fix the 'no upstream branch' error message? Then you need to run the 'git set upstream push' command. Here's how. Continue Reading
-
Tutorial
27 Mar 2024
How the saga design pattern in microservices works
When a sequence of steps must be performed to support an operation, the microservices saga design pattern is a perfect fit. Continue Reading
-
Definition
25 Mar 2024
Spring Framework (Spring)
The Spring Framework (Spring) is an open source software development framework that provides infrastructure support for building Java-based applications on any deployment platform. Continue Reading
-
Video
19 Mar 2024
Learn Maven tutorial for beginners
Apache Maven is the Java world's most popular build tool, and if you're a Java developer, it behooves you to learn it. This Maven tutorial will make you an expert in a hurry. Continue Reading
-
Video
12 Mar 2024
Full Java constructors tutorial
How well do you know how Java constructors work? This quick Java constructors tutorial teaches you about defaults, overloading, initializing and parameterizing constructors in Java. Continue Reading
-
Definition
05 Mar 2024
EAI (enterprise application integration)
Enterprise application integration (EAI) is the process of connecting an organization's business applications, services, databases and other systems into an integrating framework that facilitates communications and interoperability. Continue Reading
-
Blog Post
04 Mar 2024
Best crash course to learn Jenkins from scratch
Need to learn Jenkins CI fast? This Jenkins tutorial will quickly get you up to speed on how to use the popular CI/CD tool. Continue Reading
-
Blog Post
27 Feb 2024
Brackets vs braces vs parentheses: What's the difference?
Stop using the terms square brackets, round brackets and squiggly brackets. Use the terms braces, brackets and parenthesis instead. Here's the difference between them. Continue Reading
-
Video
22 Feb 2024
Why we use static final in Java for constants
Java doesn't have global constants per se, but it does have static final variables. Here we explore how these two keywords make a variable constant in Java. Continue Reading
-
Definition
15 Feb 2024
event handler
In programming, an event handler is a callback routine that operates asynchronously once an event takes place. Continue Reading
-
Blog Post
14 Feb 2024
String to long in Java
The correct way to convert a String to long in Java is with the parseLong method of the wrapper class. The constructor conversion approach is deprecated! Use parseLong instead. Continue Reading
-
Blog Post
02 Feb 2024
How to unstage a file in Git
Want to unstage a file in Git? Use the restore command. Other options to have Git remove a file from the staging index have unintended consequences you'd really rather avoid. Continue Reading
-
Blog Post
01 Feb 2024
Why the Java const keyword is unimplemented
Why is the const keyword in Java not implemented? It's part of the language, but it can't be used to make a variable constant. Here's why const is included in Java, and why Java's const keyword is ... Continue Reading
-
Tip
30 Jan 2024
2024 technology predictions around AI, Mojo and blockchain
Blockchain, AI, anti-competitive activity and the new programming language Mojo are sure to fill the headlines in 2024. Continue Reading
-
Tip
23 Jan 2024
Debunking 5 blockchain myths and misconceptions
There's more to blockchain development than what you hear from the crypto community. Here, we debunk five common blockchain myths. Continue Reading
-
Blog Post
18 Jan 2024
Finding duplicate entries in a list in Python
A common problem in computing is to find out if a list contains duplicate entries. It's also a good subject to explore various ways to solve a problem. In this case, we will see the performance ... Continue Reading
-
Blog Post
17 Jan 2024
Solve the prefix sum problem with SIMDs and Vector APIs
The incubating Java Vector API gives software developers access to fast and efficient SIMD operations. Here's an example of how to solve the prefix sum problem with SIMDs and Vectors. Continue Reading
-
Blog Post
11 Jan 2024
How to download and install Java 21
2024 is a great time to start working with Java, because 2023's Java 21 release has some amazing new features. Here's how to quickly download and install the Java 21 JDK. Continue Reading
-
Blog Post
09 Jan 2024
Install the Eclipse IDE on Windows video tutorial
Need to install the Eclipse IDE on Windows? This quick video tutorial shows you how to install Eclipse and build your very first Java application in the popular, open-source IDE. Continue Reading
-
Blog Post
09 Jan 2024
Find duplicates in a List in Java
Need to dedupe a Java list? Here are 5 simple ways to remove duplicates from a List in Java. Continue Reading
-
Blog Post
08 Jan 2024
The prefix sum array problem
The prefix sum problem is often used to test a developer's mettle. Here's a simple solution to the prefix sum problem in Java that uses loops, arrays and basic Java syntax. Continue Reading
-
Tip
04 Jan 2024
How the event sourcing design pattern works, with example
Learn how to control state changes as immutable events through the event sourcing model. Continue Reading
-
Tip
28 Dec 2023
The benefits of using compiled regex in Python and Java
Whether you're programming in Java or Python, compiled regex can significantly speed up your text manipulation routines. Continue Reading
-
Tip
27 Dec 2023
Shorter code, fewer bugs: Python's syntax is its saving grace
Is shorter code too dense and hard to parse, or is it inherently more efficient and secure? Here's why Python's compact syntax tends toward less buggy code. Continue Reading
-
Blog Post
27 Dec 2023
Remove duplicates from a Java List
Deduping is a common part of data cleansing. Here are four simple ways to remove duplicates from lists in Java. Continue Reading
-
Feature
19 Dec 2023
The 5 SOLID principles of object-oriented design explained
In this primer on SOLID, we'll examine the five principles this development ideology embodies, the practices they encourage and the reasons these concepts matter. Continue Reading
-
Blog Post
06 Dec 2023
How the Actor Model works by example
For enterprise systems that need a flexible, asynchronous and message driven architecture, the Actor Model is often the right fit. Continue Reading
-
Tip
05 Dec 2023
A primer on Java 21 virtual threads with examples
Virtual threads let developers build applications that handle potentially millions of users and ensure consistent service delivery. Here's how Java 21 virtual threads work. Continue Reading
-
Answer
01 Dec 2023
11 real benefits of microservices
There's a reason why so many vendors have moved from monoliths to microservices. Here are 11 real benefits microservices bring to companies. Continue Reading
-
Answer
16 Nov 2023
10 disadvantages of microservices you'll need to overcome
Not everyone is keen to adopt a cloud-native architecture, for good reasons. These common drawbacks to microservices might convince you to stick with your traditional architecture. Continue Reading
-
Tip
19 Oct 2023
Understanding protocol buffers vs. JSON
Protocol buffers have some compelling advantages over JSON when it comes to sending data between internal services. But is it really a replacement for JSON? Continue Reading
-
Tip
04 Oct 2023
9 tips to improve Python performance
Python performance gets a bad rap compared with languages such as Java. Use these tips to identify and fix problems in your Python code to tweak its performance. Continue Reading
-
Blog Post
18 Sep 2023
Java vs. Python: Application code comparison
When you compare Java vs. Python application development in terms of simplicity, conciseness, security and performance, Java comes out on top in every category. Continue Reading
-
Definition
12 Sep 2023
model-view-controller (MVC)
In programming, model-view-controller (MVC) is an architectural design pattern that organizes an application's logic into distinct layers, each of which carries out a specific set of tasks. Continue Reading
-
Blog Post
01 Sep 2023
How to discard local changes in Git
Don't overlook a file or two when you attempt to remove and discard local, uncommitted changes in Git. Learn how to locally revert and remove uncommitted changes to files in Git properly. Continue Reading
-
Blog Post
30 Aug 2023
10 reasons to use Kotlin
Curious about the Kotlin language? It's an excellent choice as either a companion or alternative to Java, and offers many capabilities Java programmers wish they had all along. Continue Reading
-
Definition
30 Aug 2023
thread
A thread is, fundamentally, a clear, well-defined theme, subject, topic or focus. Continue Reading
-
Blog Post
24 Aug 2023
How to install Jenkins on Windows
With the Jenkins installer it's incredibly easy to download and run the popular CI/CD tool. Follow these simple steps and you'll have the continuous integration server running on Windows in no time. Continue Reading
-
Blog Post
21 Aug 2023
HTTP request methods explained
While there are almost 40 registered HTTP request methods, most RESTful web developers only use five of them. Here are the most important HTTP methods and examples of how to use them. Continue Reading
-
Blog Post
21 Aug 2023
PUT vs POST: What's the difference?
What's the difference between PUT and POST methods? Here we compare POST versus PUT in terms of idempotence, URL usage, payloads and their use in RESTful APIs. Continue Reading
-
Tutorial
11 Aug 2023
Understanding TypeScript generics
Programming languages such as Java, C# and Swift use generics to create code that's reusable and enforce type safety. In this tutorial, learn how generics in TypeScript work. Continue Reading
-
Blog Post
07 Aug 2023
How to login to Docker with a Docker Hub access token
Have you been snared by Docker's "unauthorized: incorrect username or password" error when you login at the command line? Here's how to generate an access token in Docker Hub and fix it. Continue Reading
-
Blog Post
06 Aug 2023
Get started with Spring Boot 3 tutorial
Need to learn Spring Boot 3? Want to quickly build a Spring Boot app with RESTful web services? This tutorial will help you create your first Spring Boot application in just minutes. Continue Reading
-
Tip
21 Jul 2023
The dangers of Python import and how enterprises can be safe
The Python import statement carries a security risk that developers and enterprises need to watch out for. Here's how it works and why there's no easy fix. Continue Reading
-
Blog Post
19 Jul 2023
Sprint vs Scrum: What's the difference?
The comparison of Scrum versus a sprint is less about differences and more about how Agile frameworks such as Scrum, SAFe and XP use short development cycles to limit risk and keep stakeholders ... Continue Reading
-
Blog Post
13 Jul 2023
How to enable Java 21 preview features
Java 21 includes numerous highly anticipated preview features including String templates, scoped variables and unnamed classes. Here's how to enable Java 21 preview features on your JDK. Continue Reading
-
Definition
13 Jul 2023
Remote Method Invocation (RMI)
Remote Method Invocation (RMI) is an application programming interface (API) in the Java programming language and development environment. Continue Reading
-
Tutorial
12 Jul 2023
Understanding the TypeScript method decorator
This tutorial explores TypeScript method decorators, reusable code similar to Java annotations that lets developers apply logic in a declarative manner at design time. Continue Reading
-
Definition
10 Jul 2023
Java Mission Control
Java Mission Control is a performance-analysis tool that renders sampled JVM metrics in easy-to-understand graphs, tables, histograms, lists and charts. Continue Reading
-
Blog Post
10 Jul 2023
Scrum's chicken and pigs parable
In a ham and eggs breakfast, the chicken is involved, but the pig's 100% committed. That's the problematic basis of Scrum's chicken and pigs parable. Continue Reading
-
Definition
10 Jul 2023
snake case
Snake case is a naming convention where a developer replaces spaces between words with an underscore. Continue Reading
-
Blog Post
03 Jul 2023
Create your first Java AWS Lambda function in minutes
If you haven't created a Java-based AWS Lambda function before, you'll be amazed at how easy it is. This quick AWS, Lambda and Java tutorial will quickly get you started in the world of serverless ... Continue Reading
-
Blog Post
01 Jul 2023
The var keyword in Java
While the use of var in Java brings inferred typing to the platform, it does not negate Java's dedication to strong typing. Here's how the Java var keyword works, along with simple examples of how ... Continue Reading
-
Tip
30 Jun 2023
How to apply the open-closed principle in Java
How does the open-closed SOLID principle work in a Java program? Here we show you what this important principle means, and how to implement the open-closed principle in Java. Continue Reading
-
Definition
27 Jun 2023
pseudocode
Pseudocode is a detailed yet readable description of what a computer program or algorithm should do. Continue Reading
-
Quiz
20 Jun 2023
10 WebAssembly questions to test your Wasm knowledge
Test your knowledge of WebAssembly with this tough, ten-question quiz on the benefits and applications of the new Wasm standard. Continue Reading
-
Definition
19 Jun 2023
requirements analysis (requirements engineering)
Requirements analysis (requirements engineering) is the process of determining user expectations for a new or modified product. Continue Reading
-
Definition
12 Jun 2023
lambda
Lambda, the 11th letter of the Greek alphabet, is used as both a symbol and a concept in various fields of science, mathematics and computing. Continue Reading
-
Blog Post
06 Jun 2023
How Java instance main methods and unnamed classes work
Say goodbye to the public static void main method in Java 21 with the unnamed classes and instance main methods preview features. Continue Reading
-
Blog Post
04 Jun 2023
Hibernate and JPA column mapping with annotations
Effective Hibernate and JPA column mapping requires the use of the @Column annotation to set important properties such as nullability, uniqueness, precision and scale. Continue Reading
-
Blog Post
01 Jun 2023
How System.out in Java works
New developers are often confused by the line of System.out.println() code they write when first introduced to Java. Here's a quick explanation of what System.out.println() means. Continue Reading
-
Blog Post
01 Jun 2023
How to use native SQL in Hibernate and JPA
Need to use raw SQL with JPA and JPA? The Jakarta Persistence API's NativeQuery interface makes it possible to use Hibernate, SQL and JPA together in the same app. Continue Reading
-
Blog Post
31 May 2023
Java's print vs println method: What's the difference?
What's the difference between print and println methods in Java? Our examples show that it comes down to the fact that println adds a newline character to output, while Java's print method does not. Continue Reading
-
Definition
31 May 2023
tuple
A tuple, pronounced TUH-pul, is an ordered and finite list of elements in various fields of interest, including computing. Continue Reading
-
Definition
22 May 2023
API security
Application program interface (API) security refers to policies and procedures that protect APIs against malicious attacks and vulnerabilities. Continue Reading
-
Definition
19 May 2023
no op (no operation)
No op means 'no operation,' which is a computer instruction that specifies no operation but takes up a small amount of storage space. Continue Reading
-
Definition
16 May 2023
Unicode
Unicode is a universal character encoding standard that is maintained by the Unicode Consortium, a standards organization founded in 1991 for the internationalization of software and services. Continue Reading
-
Blog Post
15 May 2023
Hibernate and JPA 3 CRUD example
Struggling to get your first JPA 3 application off the ground? Here's a quick Hibernate and JPA 3 CRUD example to help you get going with the latest version of the Java Persistence API. Continue Reading
-
Tip
09 May 2023
How to address Python performance problems
Python is a great language for nonprogrammers to do mathematical and scientific tasks, even if such optimization impacts performance. Here's why that's not a fair criticism. Continue Reading
-
Blog Post
01 May 2023
The right MySQL persistence.xml example file for JPA 3 and Hibernate 6
A quick migration from JPA 2.x to 3.x can become bottlenecked if the persistence.xml file is misconfigured. Here's what a proper persistence.xml file for JPA 3, Hibernate 6 and a MySQL database ... Continue Reading
-
Blog Post
30 Apr 2023
How to write your first Java program
Want to learn to code and write your first Java program? Here's a quick and fun Java programming tutorial that will have your running your first Java program in less than 10 minutes. Continue Reading
-
Blog Post
25 Apr 2023
Hello World in Python vs Java
'Hello World' is a silly criterion to use when comparing programming languages. Yet here we are, comparing 'Hello World' in Java vs Python. We'll let you judge the winner. Continue Reading
-
Tip
31 Mar 2023
JavaScript vs. TypeScript: What's the difference?
TypeScript and JavaScript are two complementary technologies that are driving both front-end and back-end development. Here are the similarities and differences between the two. Continue Reading
-
Tip
30 Mar 2023
How to apply the single responsibility principle in Java
How does the single responsibility model work in a Java program? Here we show you what this SOLID principle means, and how to implement the single responsibility model in Java. Continue Reading
-
Blog Post
29 Mar 2023
Why is the Bootstrap grid system 12 columns wide?
Ever wonder why they created a 12-column Bootstrap grid system, and not 10 or 15? It's the same reason there's 60 seconds in a minute, or 360 degrees in a circle. Continue Reading
-
Blog Post
28 Mar 2023
There's a new Java build system named Bld
Want to write your software build logic entirely in Java? A new build tool called Bld does exactly that, and Geert Bevin and Erik Thauvin are behind it. Continue Reading