Java Tutorial - Compound Assignment Operators

Many times when we want to assign an expression to a given variable, the expression uses simple operation that involves the original value of the variable. For example, a = a + 2 means we want to add 2 to the variable, and assign the value back to it. Java provides a short hand notation for this to make programming more concise and easier to understand. We call it compound assignment operators. We will discuss around 11 of these in this post. Below are examples on how to perform compound assignment operators in Java.

Java Tutorial - Assignment Operators

It is very hard to write any program without using variables. And when we use variable, the first thing we want to do is to assign it some values. Variables are like storage of data, so it is natural for us to put some values to this storage. In this post, we will show how to use the assignment operator in Java, which assigns values to a variable.

Java Tutorial - Basic Arithmetic Operators

The most basic way we use a programming language is to develop programs that performs mathematical calculations. The foundation of the most basic of all mathematical operations are arithmetic. Which in most programming languages covers addition, subtraction, division, multiplication, and modulus. Most other mathematical calculations can be done through the use of these basic operations. Below is a tutorial on how to perform arithmetic operations in Java.

Java Tutorial - Read Input From Console

This tutorial will show how to read user input when creating a console application. This is very useful when the program you are writing needs to get input from user before it can proceed with processing.

Java Tutorial - Primitive Types

Primitive types are the most basic data types in Java that are used to store simple values. They can be used directly in programs or as a building block to create more complex data types.

Java Tutorial - Variables and Assignment Statements

Variables are a fundamental component of any programming language. This tutorial will give a brief introduction to variables in Java.

Java Tutorial - Simple Hello World Java Application

A good way of learning a new language is to analyze a simple application that outputs something to the screen. This tutorial will walk you through a simple Hello World application to help you start your journey with Java.

Java Tutorial - Setup Your Windows Development Environment

For Java beginners, I recommend to start with setting up a development environment. It is easier to understand concepts by running actual code and testing them. This Java tutorial is written to help newbie Java programmers to prepare their Windows Development Environment.