Home / Java (page 2)

Java

Binary Search in Java with examples

Binary search java 1

In the world of computer science there are so many concepts and search is the one of the most important things. For example we have telephone directory without any index and suppose we need to find someone phone number, now can you imagine how difficult it would be? If it …

Read More »

Inheritance in java with examples

Java is Object-Oriented Programming. The core concept of OOPs programming is Encapsulation, Inheritance, Class, Object, Abstraction and Polymorphism. Inheritance is one of the main core concepts in Java. Inheritance uses to reuse the code of other class. The class which is using another class property is known as a subclass …

Read More »

Bubble Sort in Java with examples

Bubble Sort Java Algorithm:- Key Point is: Take a pair from the collection of item and compare. If they have wrong order swap them. Flow: Consider a sequence 4, 2, 3, 1 Sort in increasing order Java Bubble Sort Process:- < Outer Loop> In first loop < Sequence is 4, …

Read More »

Two Dimensional Arrays in Java with Examples

In general, Array is a collection of the elements, where elements are of same data type. They are fixed in size. Array gives the random access of the elements of an array are index based and that is the main advantage of the array. But the biggest disadvantage is, its …

Read More »

Loops in Java with Examples

Loops in java are also called iteration statements. Basically, there are three types of iterations statement in java. These are while statement do-while statement For statement Iteration statement is used when need to execute a block of statement repeatedly. All three iteration statements differ in the order in which they …

Read More »