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
-
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
-
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
-
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
-
News
20 Aug 2019
Microsoft gains instant Java credibility with jClarity buy
Microsoft has acquired jClarity to help optimize its Azure cloud platform to run Java workloads, a coveted target for the now open source-friendly software giant. 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
-
Video
29 Jul 2019
How to use Spring Boot application.properties file to externalize configuration
Don't wait to externalize data in your Spring configuration any longer. Master the application.properties file with this example to get more from your data. Continue Reading
-
News
19 Jun 2019
Microsoft Visual Studio Code installer supports AdoptOpenJDK
Microsoft targets Java developers with a Visual Studio Code installer for Java that takes care of the overall Visual Studio Code setup for developers. Continue Reading
-
Video
12 Jun 2019
The top Java deployment tools to use on your next project
Java application deployment tools such as Maven and Gradle can be beneficial for your IT team. Compare those and other options, along with frameworks, to ease this process. Continue Reading
-
News
07 Jun 2019
Pivotal Spring Runtime extends Java support, company lifeline
Pivotal's distribution of OpenJDK, the open source version of Java, joins the ranks of Amazon, Azul, IBM, Red Hat and others that provide long-term Java support. 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
-
News
26 Apr 2019
NetBeans Java IDE becomes top-level Apache project
The NetBeans Java development environment has achieved top-level project status at the Apache Software Foundation, a leading open source software project hosting organization. Continue Reading
-
News
28 Mar 2019
JavaScript popularity drives TypeScript adoption among devs
More developers choose to work with JavaScript to build web, server-side and mobile applications, while TypeScript has quickly gained traction, according to recent analysis. Continue Reading
-
News
22 Mar 2019
Oracle's Java 12 adds developer productivity features
The latest version of the Java Platform, Standard Edition, delivers new features to make developers more productive with the Java programming language. Continue Reading
-
News
07 Mar 2019
Red Hat eyes cloud-native Java future with Quarkus
Red Hat's Quarkus project aims to raise Java up to the cloud and update the popular programming language for cloud-based computing situations and projects. Continue Reading
-
Opinion
22 Jan 2019
Use Java method modifiers to avoid public method antipattern
Follow best practices for Java method design, and don't allow one public class to call another. If you skipped this step, be prepared to pay the consequences. Continue Reading
-
Feature
27 Dec 2018
Year in review: Five topics that epitomized Java in 2018
In 2018, we focused on what the future of Java might look like. With the IBM-Red Hat merger and the ascension of DevOps, the life and times of the Java developer are changing. Continue Reading
-
News
26 Dec 2018
Red Hat's support for OpenJDK on Windows anchors Java apps
Red Hat brings long-term support for open source Java to developers who use Windows, so organizations can now choose one Java platform for desktop, data center and cloud. Continue Reading
-
Feature
18 Dec 2018
Recent open source flaw highlights danger of social engineering hacks
What happens when open source developers hand the keys of their project over to a new maintainer? It can expose applications to serious security threats. Continue Reading
-
Opinion
07 Dec 2018
Why there's not really a best first programming language to learn
Some consider Java to be the best first programming language for developers to learn. But does it really matter? Most languages are made up of the same building blocks. Continue Reading
-
News
16 Nov 2018
Amazon Corretto extends OpenJDK support
With Java among the most popular languages on AWS, Amazon spins out its own distribution of the OpenJDK open source Java implementation with long-term support that exceeds Oracle's. Continue Reading
-
Opinion
14 Nov 2018
Is it a mistake to teach Java as a first programming language?
Is it right to teach Java to students as an introductory programming language? If not, what are the alternatives to Java when it comes to learning how to code? Continue Reading
-
News
02 Nov 2018
IBM and Red Hat wield power over enterprise Java
Expect enterprise Java to evolve under the influence of new stewards, including IBM and Red Hat which will likely steer it toward cloud-native and microservices development. Continue Reading
-
Feature
01 Nov 2018
Stop with the unsafe internal Java API calls, or the JDK will stop it for you
Soon, any code that uses Java internal APIs will not compile, and shortly after that, code that uses classes in sun.misc will not even run. Continue Reading
-
News
26 Oct 2018
Jakarta EE spec process paves way for enterprise Java
Eclipse will govern the future direction of enterprise Java for developers through the Eclipse Foundation Specification Process, and it pledges vendor-neutral support and IP protection. Continue Reading