Array in Java (part 2)

In Java programming language, there are many useful methods, utilities for working with an array. All of those things are defined in Arrays class which could be imported via library java.util.Arrays. In this part, I will give some examples of the popular static methods that can be used for integer, float, byte, char, double, short,... Continue Reading →

Array in Java (part 1)

What is an array? In Java, an array is a group of like-type variables which are sequent addresses on memory. The size of an array is absolute and cannot be changed during program execution. The elements in an array are indexed by number and start with 0. The index of an element is like its... Continue Reading →

Switch – case in Java

Characteristic of the Switch-case A switch-case statement is used to check the value of a variable with the other values; Each different value is one case. If the case is correct, then the code block of that case will be executed. If all of the cases are wrong, then the default case will be performed.... Continue Reading →

Loops in Java

Introduction A loop is used to tell the computer to do something repeatedly. For example, you want to print out "Hello Java" 100 times. The While loop We use the While loop when we do not know how many times we have to repeat. The syntax for the while loop is: while (condition){ //code statements... Continue Reading →

Condition statements in Java

If statement is one of the most basic of control flow statements in any programming language; of course, Java is not an exception. If statement Our program will run following steps when executing an If statement checking conditionIf the condition is true, the action statements will execute, then the program will keep going with the... Continue Reading →

Java and data types

What is data type In general, an identifier that contains the size and type of a value is specified data type. Depending on what application you want to develop, you have many choices in java for the appreciated data type. In java, the data type classifieds in two main types primitive which include Integer, Character,... Continue Reading →

Java and Variable

What is variable? While a program is executing, it needs the inputs and values. A variable can be considered as a "container" that holds or storage the values while Java's program is executing. Type of variable There are three types or variable in Java including instance, local and static. Instance variable A variable is considered... Continue Reading →

What is Java?

Simple definition, Java is a programming language. For more detail, Java is an Object Oriented Programming language. Java is one of the famous programming language The main purpose of Java invention is "write once and run everywhere". In fact, a program which is coded by Java can run on many platforms including Windows, OsX, Android,... Continue Reading →

Create a website or blog at

Up ↑