Type Casting In Java

Type casting is when you want to assign value of one data type to another data type. There are two types of casting. Widening Casting: This can be done automatically. Narrowing Casting: This can be done manually. Widening casting Widening casting is done automatically when you passes smaller size type to larger size type. byte -> short -> char -> int -> long -> float -> double …

Type Casting In Java Read More »


Data Types in Java

Data types are used to categories the data concerning the type of data. Data types are divided into two groups. Primitive data types Non-primitive data types Primitive data types Primitive data types specifies the type and size of variable value. It does not have any additional method. There are eight primitive data types. Data Types …

Data Types in Java Read More »


Variables in Java

A variable is the name of a memory location which is used to store data values. It is like a container for storing data value. It is the way to represent memory location by user-defined name so that it can be easily accessible. Its value can be changed and reused. Syntax for declaring variables type …

Variables in Java Read More »


Comments In Java

Comments are used to making program human readable. Comments are those statements which will not executed by compiler or interpreter. There are two types of comments in java Single line comment Multi-line comment Single line comment Single line comments start with “//” //This is a single line comment’s example Multi line comment Multi line comment …

Comments In Java Read More »

intro to java

Introduction to JAVA

Java is a object oriented programming language developed by James Gosling in 1995 AT Sun Microsystem. Later java acquired by oracle corporation. More than 3 billions devices uses java. Java is used for following applications:- Desktop Applications Web Applications Mobile Applications Database connections Games Web Server Application server And many more things Why Use Java? …

Introduction to JAVA Read More »