Java is an Object Oriented,High level, Robust and Secured programming language. Java Application Running on 3+ billions devices.
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.
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 .
Open an editor like: Notepad, Sublime etc and write. Go to command prompt: (javac for compile and java for run).
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.
Java Operators is a symbol which is used to perform operations. Java Operators has defined such as unary operator, arithmetic […]
A keyword is a reserved word. You cannot use it as a variable name, constant name etc. Ex: int, char, float, for, while etc.
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.
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 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 */.
if Statement Use the if statement to specify a block of Java code to be executed if a condition is […]
Java switch statement is used to select one of many code blocks to be executed. How to Java switch works: Matching each expression with case Once it match, execute all case from where it matched. Use break to exit from switch Use default when expression does not match with any case
When we want to execute a block execute multiple time then we use loop.It executes until condition is true. The while executes a block of code as long as a given condition is true.
When we want to execute a block execute multiple time then we use loop.It executes until condition is true. The do - while executes a block of code as long as a given condition is true.
When we want to execute a block execute multiple time then we use loop.It executes until condition is true. The for executes a block of code as long as a given condition is true. It has multiple statements. This is very popular in all loops.
Java break is keyword which is used to going out from "switch" and loops(while, do-while, for). Java continue is also a keyword which is used to going to next condition in loops(while, do-while, for) and going to next case in switch.
Java Tokens are the smallest individual building block or smallest unit of a Java program; the Java compiler uses it for constructing expressions and statements. Java program is a collection of different types of tokens, comments, and white spaces.
In programming languages, identifiers are used for identification purpose. In Java, an identifier can be a class name, method name, […]
Literal : Any constant value which can be assigned to the variable is called as literal/constant. Decimal literals (Base 10) […]
In Java, there are a few characters that are used as separators. The most commonly used separator in Java is […]
ASCII defines 128 characters, which map to the numbers 0–127. Unicode defines (less than) 221 characters, which, similarly, map to […]
This Java Development Kit(JDK) allows you to code and run Java programs. It’s possible that you install multiple JDK versions […]
Objects that are instances of an inner class exist within an instance of the outer class.
If you've never used an object-oriented programming language before, you'll need to learn a few basic concepts before you can begin writing any code. This lesson will introduce you to objects, classes, inheritance, interfaces, and packages. Each discussion focuses on how these concepts relate to the real world, while simultaneously providing an introduction to the syntax of the Java programming language.