Category Archives: Java Programs Using Methods

Java Program Switch or Swap Arrays

Java Program Switch or Swap Two Arrays – In this program we will swap the given arrays a and b. How This Program Will Work? First of all we will check if the length that is size of the given two arrays is equal or not. If the size of arrays is equal then we can… Read More »

 1,540 total views,  6 views today

Using Recursion in Java Find Factorial of Number

Task: Write a program Using Recursion in Java Find Factorial of Number. The source code of Java program to find factorial of a given number using recursion is: /* Write a Java program to calculate factorial of a number. Use a recursive method. */ package recursivefactorial; /** * @author www.EasyCodeBook.com */ import java.util.Scanner; public class… Read More »

 768 total views,  1 views today