Primitive data types are built-in data types in java and can be used directly without using any new keyword. As we know primitive data types… Read More

# Tag Archives: java-basics

A positive integer with digits p, q, r, s…, is known as an Armstrong number of order n if the following condition is fulfilled. pqrs...… Read More

For a given number N, the purpose is to find all the prime numbers from 1 to N. Examples: Input: N = 11 Output:… Read More

The Determinant of a Matrix is a real number that can be defined for square matrices only i.e, the number of rows and columns of… Read More

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

Approach: For loop will be used to print each row in the pyramid. Inside the for loop we will use two loops : One 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