Java – Decision Making

In the programming languages, all the line of the code is an instruction to the computer. The computer follows that instruction and performs the task. But there is a disadvantage of the computer that it can’t take the decision itself. So for the decision making, programming languages use if-else and switch-case statement. Java If Statement…

Read More »

Input in Java – Different Ways

java input

Here we will learn how to accept input in Java. Java has many different ways to accept user input. Here, we will learn many of them with an example. 1. Input Using Scanner The Scanner is a predefined class of java.util package (Library), we need to import before using Scanner class. It has many different…

Read More »

Java – User Input

In this tutorial, we will learn how to accept input in Java. Java has many different ways to accept user input. Here, we will learn to accept user input using the Scanner class in detail with the example. User Input Using Scanner A Scanner is a predefined class in Java and found in java.util package…

Read More »

Java – Operators

Here, we will learn about operators in java. Operators are symbols, which perform a specific task on given values. For example +,-,* are Java operators for the arithmetical operations. Java has many different types of operators, we will discuss all of them here. Types of Operators in Java Java has many different types of Operators,…

Read More »

Java – Variables and Data Types

In this, java variables and data types tutorial, we learn how to declare a variable in java and what is data types in java. Let’s start with an example to declare variable and data type. Example: Addition of two numbers. In the above example you need to look at the first line in main() method…

Read More »

Java – First Program

In this Java tutorial, we will learn how to write your first java program, Hello World in Java. After that, we will also discuss how to compile and run a simple java program with example. First Program in Java (Hello World) Let’s start with the first example in java. To write Java code, open your…

Read More »

Java – First Step

Before we start, we should have JDK and a Text Editor installed in our PC. JDK is software for java development and, the text editor is an application where we write Java code. What is JDK? The Java Development Kit (JDK) is software for Java programs. The JDK is consist of JVM and the JRE….

Read More »