Learn Java with uByte
Learn Java programming for free with uByte. Interactive Java tutorials for beginners — write and run real code in your browser.
All Tutorials
Getting Started with Java
Write your first Java program, understand the class structure, and learn how Java compiles and runs.
Variables and Types in Java
Explore Java's primitive types, String, type casting, var keyword, and constants with final.
Output and Formatting in Java
Master System.out.printf, String.format, StringBuilder, and text blocks in Java.
Control Flow in Java
Master if/else, switch, and ternary operators to make decisions in your Java code.
Loops in Java
Master for, while, and for-each loops to repeat code and iterate over collections.
Arrays and ArrayList in Java
Work with fixed-size arrays and dynamic ArrayList collections in Java.
HashMap and Maps in Java
Store and look up key-value pairs with HashMap and the Map interface.
Methods and Functions in Java
Define and call methods; pass arguments and return values.
References and Memory in Java
Understand references, object identity, and how Java passes objects by reference value.
Classes and Objects in Java
Define classes, create objects, and use constructors and fields.
Instance Methods and Overloading in Java
Add behavior to classes with instance methods and overload methods by signature.
Interfaces and Abstract Classes in Java
Define contracts with interfaces and share code with abstract classes.
Exceptions and Error Handling in Java
Handle errors with try-catch, throw exceptions, and use finally.
Packages and Imports in Java
Organize code into packages and import classes from other packages.
Threads and Concurrency in Java
Run code in parallel with Thread and Runnable; basics of synchronization.
Testing in Java with JUnit
Write and run unit tests with JUnit 5 (Jupiter).
HTTP and HttpClient in Java
Make HTTP GET and POST requests using java.net.http.HttpClient (Java 11+).
JSON in Java
Parse and generate JSON using simple string handling or libraries like Gson.
Streams and Lambdas in Java
Use the Stream API and lambda expressions for functional-style operations on collections.