Category: 05. Java
-
Comments
Java Comments Java comments are text notes written in the code to provide an explanation about the source code. The comments can be used to explain the logic or for documentation purposes. The compiler does not compile the comments. In Java, comments are very similar to C and C++. In Java, there are three types of comments:…
-
Basic Operators
Java provides a rich set of operators to manipulate variables. We can divide all the Java operators into the following groups − The Arithmetic Operators Arithmetic operators are used in mathematical expressions in the same way that they are used in algebra. The following table lists the arithmetic operators − Assume integer variable A holds…
-
Unicode System
Unicode is an international character set that encompasses a vast range of characters, symbols, and scripts from many languages across the globe. Unicode System in Java Java programming language, being platform-independent, has built-in support for Unicode characters, allowing developers to create applications that can work seamlessly with diverse languages and scripts. Before Unicode, there were…
-
Type Casting
Java Type Casting (Type Conversion) Type casting is a technique that is used either by the compiler or a programmer to convert one data type to another. For example, converting int to double, double to int, short to int, etc. Type typing is also known as Type conversion. There are two types of cast typing allowed in Java…
-
Data Types
Data types define the type and value range of the data for the different types of variables, constants, method parameters, returns type, etc. The data type tells the compiler about the type of data to be stored and the required memory. To store and manipulate different types of data, all variables must have specified data types. Java data types are…
-
Variable Types
What is a Java Variable? A variable provides us with named storage that our programs can manipulate. Each variable in Java has a specific type, which determines the size and layout of the variable’s memory; the range of values that can be stored within that memory; and the set of operations that can be applied…
-
Basic Syntax
When we consider a Java program, it can be defined as a collection of objects that communicate via invoking each other’s methods. Let us now briefly look into what do class, object, methods, and instance variables mean. First Java Program Let us look at a simple code that will print the words Hello World. Example Let’s…
-
Environment Setup
Set Up Your Java Development Environment If you want to set up your own environment for Java programming language, then this tutorial guides you through the whole process. Please follow the steps given below to set up your Java environment. Java SE is available for download for free. To download click here, please download a version…
-
Hello World Program
Printing “Hello World” on the output screen (console) is the first program in Java and other programming languages. This tutorial will teach you how you can write your first program (print “Hello World” program) in Java programming. Java program to print “Hello World” Java program to print “Hello World” is given below: Steps to Write,…
-
JDK vs JRE vs JVM
All three JDK, JRE and JVM are interdependent. JDK is Java Development Kit primarily meant for Developers to develop Java based applications. JRE is Java Runtime Environment where Java program runs. JDK carries JRE as an integral part of it. JRE can be installed seperately as well on systems where no developement is to be…