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
-
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
-
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
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
Blog Post
19 Mar 2023
Critical Java JVM options and parameters
The easiest way to optimize your Java runtime is to supply correct JVM options and parameters. In honor of the Java 21 release, we examine the 21 most important Java JVM options you can configure. Continue Reading
-
Blog Post
04 Mar 2023
Real world Java applications
Java runs on billions of devices, and Java applications of importance run on systems all over the world. Here are the top 10 applications of Java technology today, plus a look at what the future ... Continue Reading
-
Tip
15 Feb 2023
Why Java in 2023?
Has there ever been a better time to be a Java programmer? From new Spring releases to active JUGs, the Java platform is experiencing a renaissance. Continue Reading
-
Tip
27 Jan 2023
How developers can avoid remote work scams
Software developers can find good remote programming jobs, but some job offers are too good to be true. Follow these tips to spot remote job scams. Continue Reading
-
Tip
12 Jan 2023
Tips and tricks for TypeScript programming
For those new to TypeScript or for Java developers transitioning into JavaScript, these three TypeScript tips and tricks modern day software developers will come in handy. Continue Reading
-
Tutorial
06 Jan 2023
11 lessons learned from writing my first Java program
You'll be amazed how easy it is to learn Java and write powerful cross-platform applications when writing your first Java program. Some misconceptions about Java just aren't true. Continue Reading
-
Tip
25 Oct 2022
The differences between Java and TypeScript devs must know
Do you know Java? Are you trying to learn TypeScript? Here are five differences between TypeScript and Java that will make the learning transition easier. Continue Reading
-
Tutorial
29 Sep 2022
Your top 4 Java user input strategies
From System.in to the Scanner class, there are many ways to read user input into your Java programs. Find out which Java user input strategy is best for your software needs. Continue Reading
-
Tutorial
29 Sep 2022
How Java's System.in reads input from the user
The Java System.in component provides universal access to console-based user input. Learn how to make your applications interactive with this Java System.in tutorial. Continue Reading
-
Tip
13 Apr 2022
Either log or rethrow Java exceptions, but never do both
When an exception occurs in your Java code, you can log it or you can rethrow it -- but don't do both. Here's why you must avoid that exception handling antipattern. Continue Reading
-
Tip
01 Apr 2022
7 tips to choose the right Java library
Your application is only as secure and reliable as the external libraries you use. Here's a list of the top 7 things to consider when choosing a software library for your project. Continue Reading
-
Tutorial
30 Mar 2022
An example of how suppressed exceptions in Java work
Don't ignore suppressed exceptions. In this quick tutorial we show you how to anticipate when code will throw suppressed exceptions, along with the best practices to handle them. Continue Reading
-
Tutorial
30 Mar 2022
A simple 'try with resources' in Java example
Java's 'try-with-resources' exception handling feature can help you write better, more effective Java code. Here's a quick example of the try with resources construct in action. Continue Reading
-
Quiz
21 Mar 2022
A tough, multiple choice Java exception handling quiz
Just how well do you know exception handling in Java? These 10 tough multiple-choice questions on checked and unchecked exceptions will test your error handling mettle. Continue Reading
-
Tip
16 Mar 2022
Fix these 10 common examples of the RuntimeException in Java
Don't let the occurrence of a RuntimeException in Java bring your code to a standstill. Here are 10 examples of how to avoid runtime exceptions in Java. Continue Reading
-
Tip
08 Mar 2022
Fix the 5 most common types of runtime errors in Java
The key to bug-free code is an awareness of the most common types of runtime errors in Java, along with the knowledge of how to avoid them. Continue Reading
-
Tutorial
11 Feb 2022
Fix the top 10 most common compile time errors in Java
Flummoxed why your Java code won't compile? Here are the 10 most commonly encountered Java compile errors, along with the fixes that will get your code working in no time. Continue Reading
-
Opinion
01 Feb 2022
5 tech trends that foretell the future of Java in 2022
Here's what 2022 has in store for developers, programmers and DevOps professionals who work in the server-side Java space. Continue Reading
-
Tip
10 Jan 2022
Binary and hexadecimal numbers explained for developers
For developers who are intimidated by bit shifts and hex operation, here's a thorough explanation of how binary and hexadecimal number systems work. Continue Reading
-
Tip
06 Dec 2021
Problems with Java modules still plague developers
The Java Platform Module System promised to fix the missteps of the past. Unfortunately, it has repeated the problems that plagued OSGi and JBoss Modules. Continue Reading
-
Tip
18 Nov 2021
Iterator vs. ListIterator: Which interface should you choose?
When the need exists to manipulate an ordered collection, the Java Iterator runs out of steam. Learn how Java's ListIterator improves upon the more generic Iterator interface. Continue Reading
-
Tip
14 Oct 2021
5 best Java 17 features that developers will love
The new Java 17 release contains plenty of new features that will intrigue developers. Here are five features that should push developers off the Java 11 LTS to JDK 17. Continue Reading
-
Tip
30 Sep 2021
3 simple Java Hello World examples
Are you a developer who's new to Java? Here are three ways to write a Hello World program in Java on Eclipse and get started with the popular programming language. Continue Reading
-
Guest Post
18 Aug 2021
The benefits and drawbacks of Java's fail-safe iterators
Iterators in Java are a simple mechanism to help developers avoid runtime exceptions. Let's explore the difference between fail-fast and fail-safe iterators. Continue Reading
-
Answer
16 Jul 2021
Kebab vs. camel case: How these naming conventions differ
What is the difference between a variable written in kebab case vs. camel case? Here we'll show you how these naming conventions differ and when to use one over the other. Continue Reading
-
Feature
25 Jun 2021
Java naming conventions, explained
You could start a Java variable with a dollar sign, but no one does. When you write Java code, always follow these standard Java naming conventions. Continue Reading
-
Answer
23 Jun 2021
Why is Java platform-independent?
Sun Microsystems architects designed Java to be cross-platform. But why? Here we look at not only why Java works across platforms, but also how it achieves its platform independence. Continue Reading
-
Tip
30 Apr 2021
10 Jenkins alternatives for developers
Looking for an alternative to Jenkins in your CI/CD environment? Consider options from Atlassian, GitLab, Spinnaker and more to see if they better fit your development needs. Continue Reading
-
Answer
30 Apr 2021
Camel case vs. snake case: What's the difference?
The use of white space is what separates camel case and snake case. Camel case has none, while snake case uses underscores. Let's review some examples to make this clear. Continue Reading
-
Quiz
29 Apr 2021
Test your knowledge of Java foundations
Whether you're new to Java or have worked with the language for years, you need to know the foundational building blocks. Review the basics in this Java quiz. Continue Reading
-
Feature
27 Apr 2021
A guide to common variable naming conventions
Every developer should know the basic variable naming conventions to more easily move from language to language. Review the common ones here like Pascal, camel and snake case. Continue Reading
-
Answer
23 Apr 2021
Kubernetes vs. Rancher: The differences all devs should know
How are Kubernetes and Rancher related? Here are the basics developers need to know about Kubernetes and Rancher and how they can ultimately work together. Continue Reading
-
Answer
15 Apr 2021
Interpreted vs. compiled languages: What's the difference?
Learn the difference between compiled languages like Go and interpreted ones like Java. One language is platform agnostic. The other can run a bit faster. Continue Reading
-
News
08 Apr 2021
Microsoft previews OpenJDK distro to the delight of devs
In a move meant to attract more Java developers to its Azure cloud and further support the Java community, Microsoft launched a preview of its own distribution of OpenJDK. Continue Reading
-
News
06 Apr 2021
Supreme Court ruling on Java APIs eases developer worries
Now that the Supreme Court has ruled for Google over Oracle in their high-stakes copyright battle over Java APIs, developers can rest easier -- but some questions linger. Continue Reading
-
Answer
26 Mar 2021
Pascal case vs. camel case: What's the difference?
It's easy to confuse camel case and Pascal case. We'll show you the difference between the two common variable naming conventions, along with some examples. Continue Reading
-
News
25 Mar 2021
AdoptOpenJDK moves to Eclipse Foundation as Adoptium
The Eclipse Foundation has launched a new working group to provide governance, IP services and developer advocacy for Adoptium, the newly renamed AdoptOpenJDK distribution of the OpenJDK spec. Continue Reading
-
News
16 Mar 2021
Oracle delivers Java 16 to developers
Oracle has released Java 16, the latest version of the Java Development Kit (JDK) for developers. The company also moved the OpenJDK source code repositories from Mercurial to Git. Continue Reading
-
Answer
08 Mar 2021
How do microservices API gateways aid monolith migrations?
How do you move a set of REST resources to microservices? One way is to use an API gateway. Follow this example to learn how migrate to microservices-oriented architecture. Continue Reading
-
News
03 Feb 2021
Oracle adds GraalVM Enterprise to Java SE subscription
Oracle's GraalVM Enterprise compiler technology is now available to developers as part of the Java SE subscription. GraalVM increases application performance. Continue Reading
-
Video
15 Jan 2021
5 ways to force Java garbage collection
A developer can't technically force garbage collection in Java, but it can be made a priority. If you need to free up heap space, here are five ways to prioritize it in the JVM. Continue Reading
-
Feature
23 Dec 2020
What's in a name? What developers can expect in Jakarta EE 9
What Oracle called the Java EE API is now called Jakarta EE API under the Eclipse Foundation. Here's what developers can expect in the Jakarta EE 9 release. Continue Reading
-
Quiz
15 Dec 2020
Test your knowledge of variable naming conventions
What's the difference between snake case and camel case? Or kebab case and pascal case? Try this 10-question variable naming quiz to learn more about programming variables. Continue Reading
-
Answer
25 Nov 2020
What are some benefits of a microservices architecture?
Enterprises can expect a variety of benefits when they transition to a microservices-oriented application architecture. Here we take a look at the four most beneficial. Continue Reading
-
Tutorial
18 Nov 2020
An Apache Commons FileUpload example and the HttpClient
In this article you will have a look at the capabilities of the HttpClient component and also some hands-on examples. Continue Reading
-
Answer
05 Nov 2020
Why are curly braces in programming languages important?
Curly braces play a big role in code structure within popular programming languages such as Java, C++ and more. Here's how to properly line up code with curly brackets. Continue Reading
-
Feature
25 Sep 2020
How IT can deal with challenges of a move online post COVID-19
What will the long-term effects be of COVID-19 on the IT industry? Early indications show that virtual conferences and telecommuting are signals of what the future will hold. Continue Reading
-
Feature
25 Sep 2020
How COVID-19 created a demand for COBOL basics
An uptick in COBOL interest stems from its presence in entrenched, legacy government apps, such as unemployment or apps for emergency loans. A rush to use these apps at the start of the COVID-19 pandemic reminded us all that COBOL remains a force in 2020. Continue Reading
-
Video
21 Jul 2020
Why we use static final in Java for constants
Think of a class as a cookie cutter and an individual instance as a cookie. Use this analogy to visualize how static final creates unchangeable variables in Java. Continue Reading
-
News
11 Jun 2020
Oracle's release cadence opens door for Java support rivals
Oracle has opened the door for competitors to chip away at its hold on the market for providing Java support to enterprise customers. Continue Reading
-
News
08 Jun 2020
Dojo Toolkit 7 focuses on JavaScript developer productivity
Dojo Toolkit version 7 is now available. The widely used, mature JavaScript framework favored by enterprise shops gains more features for developer productivity. Continue Reading
-
News
28 May 2020
Quarkus goes GA, gains Red Hat Runtimes support
With Quarkus, Red Hat targets the popular Spring Boot framework to help developers use Java as a first-class language to build microservices and container-based applications. Continue Reading
-
Video
27 May 2020
HashMap vs. Hashtable: Which map should you choose?
When HashMap replaced Hashtable as part of the Java 1.2 release, it moved away from how developers previously used the collections API and Java maps. Continue Reading
-
News
04 May 2020
Oracle's GraalVM finds its place in Java app ecosystem
Oracle's GraalVM, a universal virtual machine that runs apps written in Java and other languages, has carved out a spot in the Java ecosystem. Continue Reading
-
Tip
25 Mar 2020
How to refactor the God object class antipattern
Loose coupling can inadvertently create a God object problem in an object-oriented software system. Here's how to get rid of the issue and simplify the design in five easy steps. Continue Reading
-
News
23 Mar 2020
Oracle ships Java 14 with new preview, productivity features
With Java 14, Oracle delivers features to the Java language and platform that enhance the productivity of developers building new enterprise applications. Continue Reading
-
Tutorial
30 Jan 2020
Why the 8 Java primitive data types are not objects
What's the difference between Java primitive types and objects? To start, don't classify primitive types as objects. Let's explore the 3.5 categories that primitive types fall into. Continue Reading
-
Feature
30 Jan 2020
A brief history of Java: How it forever changed programming
The Java programming language is an important tool in an application developer's quiver. But Java has also undergone many changes on the road to becoming the standard it is today. Continue Reading
-
Opinion
11 Dec 2019
Don't ever put a non-Java LTS release into production
Development teams should avoid non-long-term support releases at all costs. Pay attention to the Java release cycle to make sure your updates are supported. Continue Reading
-
Video
26 Nov 2019
Tomcat vs. Jetty: How these Java application servers compare and differ
What is your Java application server of choice? Where you stand on the Jetty vs. Tomcat debate probably lends a hand to which one you use in production. Continue Reading
-
Video
25 Nov 2019
Simple Java 8 Predicate example with lambda expressions and interfaces
Use this Java Predicate example to help developers learn lambdas, expand functional programming and reduce code verbosity in their environment. Continue Reading
-
News
25 Oct 2019
AWS ups Java support, joins Java Community Process
By joining the Java Community Process, AWS will have its say over how the Java language and platform will evolve to meet the needs of cloud-native computing environments. Continue Reading
-
News
24 Oct 2019
AWS gets behind Rust programming language
AWS has joined Microsoft, Google, Mozilla and other major vendors in using and supporting the Rust programming language as a system programming language. Continue Reading
-
News
07 Oct 2019
GitHub tempts enterprises with Semmle, security enhancements
With the Semmle semantic code analysis engine freshly added to its quiver, GitHub gives corporate development teams one way to boost security of their open source software. Continue Reading
-
News
24 Sep 2019
Ecstasy programming language targets cloud-native computing
Startup Xqiz.it has a new Ecstasy programming language that aims to arm developers for the cloud-native computing era with features that Java and other programming languages lack. Continue Reading
-
Opinion
19 Sep 2019
Microsoft vs. IBM: A major shift in Java support
Once an afterthought in the Java community, Microsoft has seemingly overtaken IBM as the preeminent advocate among developers at the Oracle Code One conference. Continue Reading
-
News
18 Sep 2019
Eclipse launches Che 7 IDE for Kubernetes development
The Eclipse Foundation has introduced Eclipse Che 7, a new version of the Eclipse Che cloud-based integrated development environment aimed at creating applications on Kubernetes. Continue Reading
-
Feature
18 Sep 2019
Java's popularity hinges on future developers, adaptability
Java needs to focus on the youth, adapt to emerging tech and constantly evaluate its performance to remain popular among developers. Continue Reading
-
Feature
17 Sep 2019
No doubt now about Java release cycle
At the Oracle Code One keynote, the recent track record of on-time releases and feature enhancements is a topic to boast about. Continue Reading
-
News
11 Sep 2019
Eclipse completes enterprise Java move with Jakarta EE 8
The Eclipse Foundation has assumed control of the Java EE enterprise platform and specifications from Oracle and has launched an all open source version of the technology. Continue Reading