Java Comments

In this tutorial, you will learn about Java comments, why we use them, and how to use comments in right way. In computer programming, comments are a portion of the program that are completely ignored by Java compilers. They are mainly used to help programmers to understand the code. For example, Here, we have used… Continue reading Java Comments

 Expressions, Statements and Blocks

In this tutorial, you will learn about Java expressions, Java statements, difference between expression and statement, and Java blocks with the help of examples. In previous chapters, we have used expressions, statements, and blocks without much explaining about them. Now that you know about variables, operators, and literals, it will be easier to understand these… Continue reading  Expressions, Statements and Blocks

Java Operators

In this tutorial, you’ll learn about different types of operators in Java, their syntax and how to use them with the help of examples. Operators are symbols that perform operations on variables and values. For example, + is an operator used for addition, while * is also an operator used for multiplication. Operators in Java can be classified into… Continue reading Java Operators

Data Types

In this tutorial, we will learn about all 8 primitive data types in Java with the help of examples. Java Data Types As the name suggests, data types specify the type of data that can be stored inside variables in Java. Java is a statically-typed language. This means that all variables must be declared before they… Continue reading Data Types

Variables and Literals

In this tutorial, we will learn about Java variables and literals with the help of examples. Java Variables A variable is a location in memory (storage area) to hold data. To indicate the storage area, each variable should be given a unique name (identifier). Learn more about Java identifiers. Create Variables in Java Here’s how we… Continue reading Variables and Literals

Java JDK, JRE and JVM

In this tutorial, you will learn about JDK, JRE, and JVM. You will also learn the key differences between them. What is JVM? JVM (Java Virtual Machine) is an abstract machine that enables your computer to run a Java program. When you run the Java program, Java compiler first compiles your Java code to bytecode.… Continue reading Java JDK, JRE and JVM

Hello World Program

In this tutorial, you will learn to write “Hello World” program in Java. A “Hello, World!” is a simple program that outputs Hello, World! on the screen. Since it’s a very simple program, it’s often used to introduce a new programming language to a newbie. Let’s explore how Java “Hello, World!” program works. Java “Hello, World!” Program… Continue reading Hello World Program