#### Java Programs 15: Java Program to Print Fibonacci Series at Given Position Using Recursion

Hello Folks, It is frequently asked interview question to write a java program to print fibonacci number at any given position. I have already explained about program logics to print fibonacci series using both recursive and iterative model. Java program to print fibonacci series using iteration logic java program to print fibonacci series using recursion

Read More

#### Java Programs 14: Java Program to Print Fibonacci Series of Given Length Using Recursion

Hello Folks, This is a frequently asked programming interview question to print a fibonacci series of given length. In previous post, we have seen printing fibonacci series using iterative logic with collection concept. This will be acceptable for freshers but not for experienced, interviewer expects recursion logic.  This post explains in details how recursion takes

Read More

#### Java Programs 13: Java Program to Print Fibonacci Series of Given Length Using Collection

Hello Folks, This is a frequently asked programming interview question to print a fibonacci series of given length. Fibonacci series: Wikipedia defines it very well. The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and characterized by the fact that every number after the first two is the sum of the two preceding

Read More

#### Java Program 12: Java Program To Find Divisors Of Given Number

Problem: Write a JAVA program to find the divisors of a given number. Solution: Divisor is a number that divides  another number without a reminder or a number that divides an integer evenly. Ex: 10/2= 5 (Here 2 is divisor.) Logic 1: Positive Divisor of a number N will be greater than or equal to 1 and

Read More

#### Java Program 11: Find Position Of Letter In Alphabet

Hello Folks, As part of Frequently Asked Programs in Java , I will discuss a new program in this post. Problem: Accept a letter from user and print position of input letter in alphabet. Example: A has 1st position in alphabet. B has 2nd position in alphabet. Solution: We will use ASCII concept here. Every letters in

Read More

#### Java Program 10: Draw An Equilateral Triangle Using Stars Of Given Row

Hello Folks, As part of Frequently Asked Programs in Java , I will discuss a new program in this post. Problem statement: Draw an Equilateral Triangle using stars of given row. Example: An Equilateral Triangle of 5 rows: Solution: Number of stars in a row is equal to row number. For example: First row has one star, Second row

Read More

#### Java Program 09: Printing Words In Circular Order From Given Index

Hello Folks, This is frequently asked interview question. Problem: Suppose you have below string: “Make Selenium Easy” Where -“Make” is at position zero. -“Selenium” is at first position . -“Easy” is at second position . If I say: -zero, You need to print “Make Selenium Easy”. -one, you need to print “Selenium Easy Make”. -two, you

Read More

#### Java Program 08: Program to find occurrence of individual characters in a given string.

Hello Folks, As part of frequently asked java programs, we will learn to develop a java program to find out occurrence of individual characters in a given string. Logic: To get input from user, we will use Scanner class. We will use Map interface concept here which deals in key-value pair. We will convert given

Read More

#### JAVA Program 5: Swap two integer variables without using third variable

Problem: Write a java program to swap values of two integer variables without using third variable. Solution: Java Program:

Output: Enter the 1st number: 21 Enter the 2nd number: 33 Before Swap: Value of x: 21 Value of y: 33 After Swap: Value of x: 33 Value of y: 21 #HappyCoding

#### Java Program 06: Print a Floyd Triange of given number of rows

Problem: Write a java program to print a Floyd’s triangle for a given number of rows. Solution: Floyd’s triangle is a right-angled triangular array of natural numbers, used in computer science education. It is named after Robert Floyd. It is defined by filling the rows of the triangle with consecutive numbers, starting with a 1

Read More

Please wait...

### Subscribe to new posts to become automation expert

Want to be notified when my new post is published? Get my posts in your inbox.