Polymorphism and abstraction (OOP 3)

In the previous blog, I stated 2 of 4 properties of OOP in Java. In this article, I would like to go through 2 remaining properties including Polymorphism and abstraction. Polymorphism Polymorphism means we can perform the one task in many different ways depending on the situation and context that it get involved. For example,... Continue Reading →

Class in Java – OOP(1)

Java is an Object Oriented Programming (OOP) language; Thus, understanding what it is and how it works is very important for going further. In this article, I would like to go through the core definitions of OOP such as class, constructor and instance. Class, what the heck is it? Class is an abstract thing used... Continue Reading →

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 →

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 →

Create a website or blog at WordPress.com

Up ↑