Skip to content

Category Archives: Java Programs

Downward triangle star pattern means we want to print a triangle that is downward facing means base is upwards and by default, orientation is leftwards… Read More
Given an array arr[] of n elements, write a function to recursively search a given element x in arr[]. Illustration: Input : arr[] = {25,… Read More
The upper star triangle pattern means the base has to be at the bottom and there will only be one star to be printed in… Read More
Here we are getting a step ahead in printing patterns as in generic we usually play with columnar printing in the specific row keep around… Read More
Approach: 1. Get the number of input rows from the user using Scanner Class or BufferedReader Class object. 2. Now run two loops Outer loop… Read More
For a given 4 x 4 matrix, the task is to interchange the elements of the first and last columns and then return the resultant… Read More
For a given 4 × 4 matrix, the task is to interchange the elements of the first and last rows and then return the resultant… Read More
Pascal’s triangle is a triangular array of the binomial coefficients. Write a function that takes an integer value n as input and prints the first… Read More
In this article, we are going to learn how to print mirror lower star triangle patterns in Java.  Illustration: Input: number = 7 Output: *… Read More
For a given 2D matrix, the purpose is to find the Trace and Normal of the matrix. Normal of a matrix is defined as the… Read More
For a given positive integer N, the purpose is to find the value of F2 + F4 + F6 +………+ F2n till N number. Where… Read More
For any given character, we need to check if it is a vowel or a consonant. As we know, vowels are ‘a’, ‘e’, ‘i’, ‘o’,… Read More
Remember while we were converting octal to decimal we were taking 3 binary digits at a time. A similar approach will be used where here… Read More
ConcurrentSkipListMap API is based on the implementation of the ConcurrentNavigableMap. This map is sorted according to the natural ordering of its keys or by a… Read More
The LinkedHashMap is just like HashMap with an additional feature of maintaining an order of elements inserted into it. HashMap provided the advantage of quick… Read More