Java Tutorial
The best way to learn to program is to start programming.
Java is a popular programming language.
Java is used to develop mobile apps, web apps, desktop apps, games and much more.
The most famous operating systems that were written in a programming language Java: Android OS, BlackBerry Tablet OS and JavaOS.
Start learning Java now »Examples in Each Chapter
Our "Try it Yourself" editor makes it easy to learn Java. You can edit Java code and view the result in your browser.
Example
public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Try it Yourself »
Click on the "Run example" button to see how it works.
We recommend reading this tutorial, in the sequence listed in the left menu.
Java is an object-oriented language, and some concepts may be new. Take breaks when needed, and go over the examples as many times as needed.
Java Exercises
Java Quiz
Test your Java skills with a quiz.
Learn by Examples
Learn by examples! This tutorial supplements all explanations with clarifying examples.
My Learning
Track your progress with the free "My Learning" program here at W3Schools.
Log into your account, and start earning points!
This is an optional feature, you can study W3Schools without using My Learning.
Java Reference
Java Keywords Java String Methods Java Math MethodsDownload Java
Download Java from the official Java website: https://www.oracle.com
Online W3Schools Certification
The ideal solution for professionals who need to balance work, family and career.
Over 25,000 certificates have already been issued!
Kickstart your amazing career!
Get certified by completing the course on our website!
Take the course!You can also familiarize yourself with the Java tutorial from the hyperskill.org website.
Please note...
The Java programming language is used to create many famous programs and web applications. Here are some of them:
- Android OS - the most popular operating system for mobile devices
- Android Studio - a development environment for the Android mobile platform
- IntelliJ IDEA - an integrated development environment from JetBrains
- Eclipse - an integrated software development environment that helps programmers write, test, and debug code
- OpenOffice - an open source office suite that is similar in functionality to MS Office
- Minecraft - a popular video game that uses Java for its implementation
- Apache Cassandra - an open source database management system
- Apache Lucene - a full-text search and indexing library
- Apache Tomcat - a web server and servlet container used for deploying Java applications on web servers
- Spring Framework is a popular framework for developing web applications in Java, which provides various tools for handling HTTP requests, integrating with databases, and much more.
- Hibernate is a database library based on the Java Persistence API, which allows you to store and retrieve Java objects in the database.
- Jenkins is a tool for automating the process of building, deploying, and testing software.
- JavaServer Faces (JSF) is a framework for building component-based web interfaces. Used to create dynamic web pages
- Struts - a web application development framework that helps organize code and handle HTTP requests
- Liferay - a platform for building corporate portals and websites, developed in Java
- Vaadin - a web application development framework using Java and HTML. Allows you to create rich interfaces
- GWT (Google Web Toolkit) - a web application development tool that allows you to write client-side code in Java and convert it to JavaScript
- Vuze - a BitTorrent client
These are just a few of the many programs and web applications that have been created using the Java programming language. These applications showcase the diverse capabilities of the Java programming language.