Java Prime Number Program

  Program to find whether a given number is prime or not. /** * This program is used to find that given number is prime or not. * @author W3schools360 */ public class PrimeNumber { /** * This method is used to find that given number is prime or not. * @param num */ static … Read more

Java Palindrome Number Program

  Program to find that the given number is Palindrome or not. /** * This program is used to find that given number is Palindrome or not. * @author W3schools360 */ public class PalindromeNumber { static void palindrome(int num){ int newNum = 0, reminder, temp; temp = num; //Reverse the digit’s of the number. while(temp … Read more

Java Fibonacci Series Program

  Program to print the Fibonacci series. /** * This program is used to print fibonacci series. * @author W3schools360 */ public class FibonacciSeries { /** * This method is used to print fibonacci series. * @param num */ static void fibonacci(int num){ int f1, f2=0, f3=1; for(int i=1;i <=num;i++){ System.out.println(f3); f1 = f2; f2 … Read more

Java Factorial Program

  Program to calculate Factorial of given number. /** * This program is used to calculate Factorial of given number. * @author W3schools360 */ public class Factorial { /** * This method is used to calculate Factorial of given no. * @param num */ static void factorialNumber(int num){ int fact = 1; //Factorial of 0 … Read more

Java Even Odd Program

  Program to check that a given number is even or odd. /** * This program is used to check that given number is even or odd. * @author W3schools360 */ public class EvenOrOdd { /** * This method is used to check that given no is even or odd. * @param num */ static … Read more

Java Armstrong Number Program

  Program to find whether the given number is Armstrong or not. /** * This program is used to find that given number is Armstrong or not. * @author W3schools360 */ public class ArmstrongNumber { /** *This method is used to find that given number is Armstrong or not *@param num */ static void armstrong(int … Read more

Java Arithmetic Operations Example

Program to perform arithmetic operations. /** * This program is used to perform arithmetic operations. * @author W3schools360 */ public class ArithmeticOperations { /** * This method is used to add two numbers. * @param num1 * @param num2 */ static void addition(int num1, int num2){ System.out.print(“Addition of given numbers = “); System.out.println(num1 + num2); … Read more