Tag Archives: Java

Java Switch

Java switch statement will allow you to check for a number of condition to execute the statements. It works like an if-else-if statement. The switch statement will allow you to use byte, short, int, long, enum types, String and some wrapper types like Byte, Short, Int, and Long. with the latest version of Java, you can also use… Read More »

Java If-else

Java supports testing the given condition in order to execute some statements. The if-condition will work on the boolean condition either true or false. You will encounter a number of if-condition statements- If If-else If-else-if Nested if If statement This statement will allow you to test a condition that is specified by the user. This condition is followed… Read More »

Java Keywords

Java keywords are the reserved words which cannot be used as any variable or any object name. These keywords have some meaning in Java and perform some actions when used correctly. Java Keywords List Below is the list of the keywords available in Java- Keyword Description abstract It is used to declare the abstract class which provides the… Read More »

Java Operators

Java supports a number of operators that allows you to perform various operations on the variables. Below are the commonly used operators are given below- Bitwise Operator, Logical Operator, Ternary Operator and Assignment Operator. Unary Operator, Arithmetic Operator, Shift Operator, Relational Operator, These operators have precedence over the other and is defined using below table- Operator Type Category… Read More »

Java Data Types

Java supports two types of data types. Data types specify the type of value that can be stored within the variable that may vary in sizes and values. Java Data Types The two types of Java data types are- primitive and non-primitive 1. Primitive data-types These data types are the building blocks for manipulating the data. Below is… Read More »

Java Variables

Variables are used to hold some value within the Java program. You can define the variable with the data type and can assign the value of that particular data type. Variable can be considered to be the name given to the memory location. Variables can be of three types- local, instance and static. Two types of data types-… Read More »

JVM: Java Virtual Machine

Java virtual machine is an abstract machine which provides you with the runtime environment to execute Java bytecode. JVM depends on the underlying platform. JVM is nor compatible with many hardware and software.  What is JVM (Java Virtual Machine)? JVM is a specification which specifies the working of JVM. but the algorithm will be chosen by their implementation… Read More »

How to set path in Java?

To use the java tools like javac you have to set the path to access the functionality. If you are using the directory JDK/bin for your code then you do not need to set the path as all the tools will be available in that directory. But if you are saving your java source code outside the JDK… Read More »

Hello Java Program

For start writing a simple Java program, you have to install the JDK. java works on the concept of classes and objects. First, we have to create a class that has the main method to invoke the object creation. Basic requirements Install JDK Set the path of the jdk/bin directory Start writing the Java program using code editors… Read More »

History of Java

Java was earlier started as an Oak project by James Gosling in 1995. James started this technology to implement the virtual machine with the C like notation but simpler than C/C++. This was basically designed for developing interactive television, digital devices which later on used for internet programming. It is secure and allows network and file access. Java… Read More »