
Java Examples - Programiz
You are advised to take the references from these examples and try them on your own. All the programs on this page are tested and should work on all platforms.
Java Hello World - Your First Java Program
After all, it's a basic program to introduce Java programming language to a newbie. We will learn the meaning of public, static, void, and how methods work? in later chapters.
Java String (With Examples) - Programiz
In Java, a string is a sequence of characters. For example, "hello" is a string containing a sequence of characters 'h', 'e', 'l', 'l', and 'o'. In this tutorial, we will learn about strings in Java …
Java for Loop (With Examples) - Programiz
In this tutorial, we will learn how to use for loop in Java with the help of examples and we will also learn about the working of Loop in computer programming.
Java Methods (With Examples) - Programiz
A method is a block of code that performs a specific task. In this tutorial, we will learn to create and use methods in Java with the help of examples.
Java Class and Objects (With Example) - Programiz
Objects and classes are the core concept of object-oriented programming. In this tutorial, you will learn about the objects and classes in Java with the help of examples.
Java Array (With Examples) - Programiz
In this tutorial, we will learn to work with Java arrays. We will learn to declare, initialize, and access array elements with the help of examples. An array is a collection of similar data types.
Java try...catch (With Examples) - Programiz
The try...catch block in Java is used to handle exceptions. In this tutorial, we will learn about the try...catch statement in Java with the help of examples.
Java if...else (With Examples) - Programiz
The Java if...else statement is used to run a block of code under a certain condition and another block of code under another condition. In this tutorial, we will learn about if...else statements in …
Java switch Statement (With Examples) - Programiz
The switch statement allows us to execute a block of code among many alternatives. In this tutorial, you will learn about the switch...case statement in Java with the help of examples.