Java programming language was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems’ Java platform (Java 1.0 [J2SE]). Now it has became the one of the most popular computer programming language and is now being used by more than 2 billion devices.
Java
Java Basic Data Types
Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory.
Scope and Lifetime of Variables
Java allows variables to be declared within any block. Scope and Lifetime of variable is determined how and where those variable is defined.
Type Conversion and Casting
Java Operators
Like other programming languages, there are arithmetic operators, bitwise operators and logical operators in Java.
Java Decision Making
There are three types of selection or decision making statements in Java. First one is if
statement which either performs (selects) an action, if a condition is true, or skips it, if the condition is false. Second is if
…else
statement which performs an action if a condition is true and performs a different action if the condition is false. Third one is switch
statement which performs one of many different actions, depending on the value of an expression.
Java Iteration Statements
Iteration statements create loops in the program. In other words, it repeats the set of statements until the condition for termination is met. Iteration statements in Java are for, while and do-while.
Java Break, Continue and return
break, continue and return are branching statements in Java. Each of these statement has their importance while doing programming in Java.
Java Arrays
An array is a group of like-typed variables that are referred to by a common name. Array of any type can be created and may have one or more dimensions. Arrays offer a convenient means of grouping related information.
Java Command-Line Arguments
There may be the situation where you will want to pass information into a program when you run it. This is accomplished by passing command-line arguments to main( ).