JSRs and APIs
In this section on the Java programming language, get news, advice, and tutorials on using Java in enterprise application development. Learn why Java is so widely used in programming today, and discover tricks to use and pitfalls to avoid. It's important to stay informed about the latest Java Specification Requests (JSRs) and application programming interfaces (APIs). We bring you news about JSRs and APIs, popular Java platforms, classes, objects, IDEs, and SDKs that exist for programming in Java.
Top Stories
-
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
-
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
-
Blog Post
04 Dec 2022
How do you say Udemy? The 11 most mispronounced tech terms
How do you say Udemy? How do you pronounce JSON or GIF? There's a right way and there's a wrong way. Learn the right way to say these commonly mispronounced tech terms. 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
-
Blog Post
09 Sep 2022
Java Exception handling best practices
Don't let the complexities of Java Exception handling get you down. Follow these top 10 Java Exception handling examples and you'll be an expert in handling errors in your Java code. Continue Reading
-
Blog Post
23 Jul 2022
Java Scanner String input example
Java's Scanner class provides a simple and effective way to handle user input. In this simple example, we show how to use Java's Scanner for String input with methods like next(), nextLine() and ... Continue Reading
-
Blog Post
13 Jun 2022
How to format a Java double with printf example
Formatting output in Java doesn't have to be hard. Here's how to use Java printf with double values to control decimal precision, thousands groupings and character width when you format ... Continue Reading
-
Blog Post
11 Jun 2022
Example Java String palindrome checker program using recursion
There are many ways to write a Java String palindrome program. In this Java palindrome example we demonstrate recursion and how the use of loops, arrays, Scanner and the reverse method can improve ... Continue Reading
-
Blog Post
09 Jun 2022
Java length vs length(): What's the difference?
Have you ever been confused between length and length() in Java? Here we show you the difference between Java length properties and methods, and when to use them in your code. Continue Reading
-
Blog Post
07 Jun 2022
The best Jar file opener app
There are many Java JAR file openers available on the market today. Here are the top 5 JAR file openers for both Java developers and casual users to install on their Windows or Linux machines. Continue Reading
-
Blog Post
20 Apr 2022
CDI Full vs CDI Lite: What's new in Contexts and Dependency Injection 4.0
There's an interesting change packaged inside the CDI 4.0 release that will change the way you think about the API. Version 4.0 of Jakarta Contexts and Dependency Injection (CDI) changed the ... Continue Reading
-
Answer
18 Apr 2022
What are checked vs. unchecked exceptions in Java?
Understand the difference between checked and unchecked exceptions in Java, and learn how to handle these problem conditions properly and gracefully. 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
-
Blog Post
14 Feb 2022
Noon is not 12am. Midnight is not 12pm. Code appropriately.
The terms 12am and 12pm make no logical sense. Neither one is noon or midnight. Remove the 12am vernacular from your applications. Users will thank you. 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
-
Blog Post
07 Feb 2022
Node.js file upload example with Ajax and JavaScript
The Node.js file upload process is made easy with libraries like 'fs' and 'formidable.' In this JavaScript and Node.js file upload example, we show you how to move files from the browser to the ... 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
-
Blog Post
25 Jan 2022
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
-
Quiz
24 Jan 2022
12 tough Bootstrap 5 quiz questions for web developers
Just how well do you know Bootstrap 5? These 12 tough Bootstrap quiz questions will test your mettle. Continue Reading
-
Blog Post
31 Dec 2021
The psychology of offering developers programming advice
Need to provide programming advice, or perhaps even harsh criticisms to a team of developers? Here's a nice way, pyscyhologically sound, way to do it. 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
-
Blog Post
29 Nov 2021
Top 5 things to know about the Jakarta Servlet 6.0 API release
Jakarta EE 10 includes a full increment release of the Servlet API. Here are the top 5 features Java devs will enjoy when the Jakarta Servlet 6.0 API arrives. Continue Reading
-
Blog Post
29 Nov 2021
How to use jarsigner to sign JARs files example
Here's a quick example of how to use Java's jarsigner to digitially sign JAR files. Continue Reading
-
Blog Post
29 Nov 2021
The 5 things devs should know about the Jakarta Servlet 6.0 API release
Jakarta EE 10 includes a full increment release of the Servlet API. Here are the top 5 features Java devs will enjoy when the Jakarta Servlet 6.0 API arrives. 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
-
Feature
17 Sep 2021
5 reasons why Java is still the best programming language
Here's why Java is still the most popular programming language for everything from mobile development to enterprise and server-side applications that empower the middle tier. Continue Reading
-
Blog Post
14 Sep 2021
Every changes between JDK 11 and the Java 17 LTS release
Wondering what's included in the new Java 17 LTS release? Here's a list of all the changes made to the JDK between the Java 11 and Java 17 LTS releases. Continue Reading
-
Feature
07 Sep 2021
Java Iterator vs. Enumeration: Why Iterator is the right call
Do you need to loop through a collection of objects and need to decide between a Java Iterator or an Enumeration? Here's why you should choose an Iterator almost every time. 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
-
Blog Post
03 Jun 2021
Fix the ConcurrentModificationException
Has the ConcurrentModificationException been thrown in you Java app? Here are four simple ways to fix the ConcurrentModificationException in your code. 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
-
Blog Post
30 Apr 2021
Yes, the original name for Java was Oak
When Sun Microsystems first developed a programming language to power their Star7 entertainment controller, they named it Oak, not Java. Continue Reading
-
Blog Post
29 Apr 2021
Java's main function explained with examples
Here's the anatomy of Java's main method. An anachronism with the rise of Servlets and JSPs, Spring Boot and Eclipse Microservice developers are seeing more of Java's main function as apps are ... 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
-
Blog Post
30 Mar 2021
Recursion vs Iteration: What's the difference?
This Java recursion tutorial shows you how to create a recursive Java factorial function and compares these methods to iterative ones. 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
-
Blog Post
24 Mar 2021
Five examples of recursion in Java
We often debate the merits of iterative vs recursive Java code. Let’s take a look at 5 Java recursion examples and see where the concept of recursion fits. Continue Reading
-
Answer
10 Mar 2021
Synchronous vs. asynchronous microservices communication patterns
What's the difference between synchronous, asynchronous and hybrid communication for microservices? Follow the examples below to establish how microservices communicate. 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
-
Answer
26 Feb 2021
Should my company move its apps to microservices?
Microservices-oriented architecture is more flexible than monolithic structures, but microservices comes with costs companies need to weigh against the potential benefits. Continue Reading
-
Answer
19 Feb 2021
What are some of the disadvantages of microservices?
Microservice-oriented architecture has its benefits, but it comes with some drawbacks as well, such as data translation and debugging. Let's go over the big four. Continue Reading
-
Answer
18 Feb 2021
Your near-zero downtime microservices migration pattern
The possibility of extended downtime is a common reason to avoid a migration to microservices. Learn how to minimize downtime with this monolith-to-microservices migration pattern. Continue Reading
-
Blog Post
29 Dec 2020
Performance cost of autoboxing Java primitive types explained
The boxing and unboxing of Java primitive types has severe performance implications. Uncover the truth about autoboxing Java primitive types in this JDK Mission Control and JVM Flight Recorder example. 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
-
Answer
23 Dec 2020
What makes an effective microservices logging strategy?
System size and scale play a big role in microservices logging. Follow these best practices to develop a solid logging strategy within a microservices architecture. Continue Reading
-
Answer
22 Dec 2020
How is asynchronous microservices tracing best accomplished?
How can you trace a tricky workflow in an asynchronous microservices-oriented architecture? Two options include correlation IDs and distributed tracing tools. 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
-
Answer
18 Nov 2020
What are the most essential microservice design principles?
Don't hinder a microservices architecture because of a faulty design. Keep these five design principles in mind to build the proper components for your microservices architecture. 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
-
Quiz
17 Nov 2020
10 microservices quiz questions to test your knowledge
Don't sweat the details with microservices. Take this 10-question quiz to boost your microservices knowledge and impress interviewers during a job hunt. 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
-
Infographic
16 Oct 2020
A Java programming career path can open doors beyond code
A Java programming career path can lead to so much more than code. Programmers should consider these options that extend beyond the confines of software development. Continue Reading
-
Video
30 Sep 2020
A HibernateUtil class example to simplify JPA code
Developers can use HibernateUtil to mitigate access to JPA EntityManager and create more readable, less resource intensive code for data-driven applications. 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
-
Opinion
13 Aug 2020
5 must-listen Joe Rogan Experience podcasts for programmers
Most listeners won't expect the Joe Rogan Experience podcast to delve into topics for developers and programmers, but these five episodes are of special interest to IT professionals. Continue Reading
-
Blog Post
04 Aug 2020
Here's why the const keyword in Java is not implemented
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. Learn more about const and why developers continue to ponder its usage ... Continue Reading
-
Video
29 Jul 2020
How JPA EntityManager handles Hibernate transaction management
Follow this JPA EntityManager persist example tutorial to see how it can be used for transaction management and how to save changes to the database. 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
-
Video
26 Jun 2020
3 ways to have JPA and Hibernate create tables in a database
JPA frameworks such as Hibernate can automatically create tables. Here are three ways to have JPA and Hibernate create tables in a database. Continue Reading
-
Video
25 Jun 2020
Simple database integration with the JPA persistence.xml file
The persistence.xml file plays a significant role in all facets of JPA-based application development. Examine the file's properties for a simple configuration to ease development. Continue Reading
-
Video
12 Jun 2020
Create a distraction free JPA and Hibernate dev environment
A minimalistic approach is the way to go for development with Hibernate and JPA. Create a development environment with only the basics -- a JDK, Hibernate and a text editor -- to get started. Continue Reading
-
Video
08 Jun 2020
How to install MySQL on Windows for app development
Couple a MySQL installation on Windows with three helpful developer tools, MySQL Workbench, MySQL Shell and Connector/J for an easy-to-use back-end database with community support. Continue Reading
-
Blog Post
01 Jun 2020
How to make multiple values per key in a Java map possible example
Need to add multiple values to a key in a Java HashMap but can't figure out how to do it? Here are three examples of how to solve the multiple values per key problem in Java. 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
-
Blog Post
07 Feb 2020
Why you should make kebab case a URL naming convention best practice
They say there are only two difficult challenges in the world of computer programming: Synchronizing the invalidation of a distributed tertiary and quaternary cache; and What to name things. Given ... 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
-
Tutorial
27 Jan 2020
How to properly perform Java String comparisons
Don't let incorrect Java String object comparisons bog down your code. Follow this tutorial to understand the differences between =, == and .equals. Continue Reading
-
Video
20 Dec 2019
JDBC tutorial: Easy installation and setup with Apache Derby
New database developers can get up to speed with this tutorial on JDBC and Apache Derby. Follow these steps to install and connect to the Derby database on your terminal. Continue Reading
-
Blog Post
15 Dec 2019
Moving JavaOne to Las Vegas shows Oracle has 2020 vision
The rebranding of JavaOne to Oracle Code One and move from San Francisco to Las Vegas is one that I will welcome with open arms, and you should too. 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
-
Feature
27 Nov 2019
Public API strategy considerations for enterprise adoption
As organizations look for more cost-effective ways to manage data, an evolving landscape with APIs has made the technology more useful for both the business and IT side. 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
-
Video
19 Nov 2019
How to run Java preview features such as JDK 13 text blocks
Follow these five steps to enable the JDK 13 text blocks as part of the preview features in the latest Java release and use multi-line String literal in your code. Continue Reading
-
Feature
14 Nov 2019
Ideas on how to hold a successful code hackathon
Want to host a hackathon? Here are some ideas on what a company can do to host an event that solves problems and reenergizes the organization. Just don't forget the food. Continue Reading
-
Podcast
16 Oct 2019
Java video games, like Minecraft, keep the language popular
The next generation of Java developers can learn the ins and outs of the language through an unlikely source: video games such as Minecraft. Continue Reading
-
Video
16 Oct 2019
5 steps for an easy JDK 13 install on Ubuntu
Follow these five steps for an easy Java 13 installation on Ubuntu, and don't forget to set JAVA_HOME and the PATH variables. Continue Reading
-
Feature
07 Oct 2019
You need more than web app security to stop API attacks
API and web application vulnerabilities may share some common traits, but it's where they differ that hackers will target. 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
-
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
-
Tutorial
08 Aug 2019
How to install the JDK on Windows and set up JAVA_HOME
You have options when it comes to JDK installations on Windows and Linux. Here are some helpful tips to ensure a proper install and why JAVA_HOME can be helpful. Continue Reading
-
Feature
23 Jul 2019
How to set JAVA_HOME in Windows and echo the result
Set JAVA_HOME properly and echo your results with the following tidbits, and also examine how a proper PATH installation can benefit your local environment. Continue Reading
-
Blog Post
18 Jul 2019
How to become a good Java programmer without a degree
Great Java programmers are judged by their work, not their resume. How to become a good Java programmer without a degree largely depends on your own course of action and the hours you spend ... Continue Reading
-
Video
28 Jun 2019
Hibernate vs. JDBC: How do these database APIs differ?
Don't overthink it. Hibernate and JDBC aren't the same thing. But how do these database APIs differ? Here's a brief history lesson and explainer to find out. Continue Reading
-
Blog Post
25 Jun 2019
Hibernate vs JPA: What's the difference between them?
Let us settle the Hibernate vs JPA debate for you. Here we explain the difference between JPA and Hibernate so that you'll never have to choose between the two database APIs. Continue Reading
-
Video
30 May 2019
JDBC in Java: 5 facts to know before you begin
Are you new to Java programming? Here are five interesting facts about the JDBC API and what you need to know about it to ease your development pathway. Continue Reading
-
Video
24 May 2019
JDBC vs. ODBC: What's the difference between these APIs?
There are more similarities between ODBC and JDBC than there are differences. But, the differences are significant. Here we highlight them. Continue Reading
-
Blog Post
01 May 2019
Java's UnaryOperator in Lambda expressions example
Do you need an example of how to use Java's UnaryOperator in a functional Lambda expression? This tutorial shows you where when and how to use the UnaryOperator interface in a function. Continue Reading