java

Java Comments

Java Comments can be used to help for description the code. It will never show on run time. Single-line comments It starts with two forward slashes (//). Java Multi-line Comments. More than one line comments start with /* and ends with */.

Java Type Casting or Type Conversion

Type casting is when you assign a value of one primitive data type to another type. In Java, there are two types of casting:
Widening Casting (automatically) – converting a smaller type to a larger type size

Java Variables

Variable allocates reserved memory area. char ch=’A’;//chis variable | int num=10;//num is variable | Types of Variable 1-Local Variable is declared inside the method. 2-Instance Variable is declared inside the class but outside the method. 3- Static variable is declared as with static keyword.

Java Keywords

A keyword is a reserved word. You cannot use it as a variable name, constant name etc. Ex: int, char, float, for, while etc.

Java Operators

Java Operators is a symbol which is used to perform operations. Java Operators has defined such as unary operator, arithmetic operator, relational operator, shift operator, bitwise operator, ternary operator and assignment operator. Java Arithmetic Operators Java Arithmetic operators are used to perform common mathematical operations. Operator Name Description Example + Addition Adds together two values […]

Java Data Types

Data types in Java:1- Primitive data types: The primitive data types include boolean, char, byte, short, int, long, float and double.
2- Non-primitive data types: The non-primitive data types include Classes, Interfaces, and Arrays.

First program in Java

Open an editor like: Notepad, Sublime etc and write. Go to command prompt: (javac for compile and java for run).

Java Features

Java language is simple because mostly syntaxlike C++ . Java removed pointers, operator overloading etc. No need Java has Automatic Garbage Collection which removes non referenced objects .

Java History

Java team members developed a language for digital devices such as televisions, set-top boxes etc. Now a days, Java is widely used in online programming, mobile devices, video games, e-business etc.

About Java

Java is an Object Oriented,High level, Robust and Secured programming language. Java Application Running on 3+ billions devices.

1 10 11 12