Home » Armstrong Number, Palindrome Number, Prime Number, Even Number, Odd Number All In A Single Program

# Armstrong Number, Palindrome Number, Prime Number, Even Number, Odd Number All In A Single Program

## Armstrong number & Palindrome number & Prime number & Even number & Odd number

In below program Armstrong number, Palindrome number, Prime number, Even Number, Odd number get all together in a single java program. Below I have shown you a simple java example of Java Inheritance, Which is also an example of Oop or objects oriented program. Let’s check Factorial number java program.

In this program, users are required to give a single input to get output for Armstrong number, Palindrome number, Prime number, Even Number, Odd number. In a below-designed java program, I have specially handover java function to each one separately to make it in easier in understanding. check Reverse number in java.

Note:- Most important things in this java program.

## Armstrong number & Palindrome number &  Prime number & Even Number & Odd number

Here in below, I have noted down all the java program and I have assembled all in one. So now let’s check it and care. Get a repeated character in java.

Note: >   First

 1| import java.util.*; 2| public class class_main_methods{ 3| public static void main(String[] args){ 4| Scanner input=new Scanner(System.in); 5| System.out.print(“Your Number -> “); 6| int number=input.nextInt(); 7| int length=String.valueOf(number).length(); 8| System.out.println(); 9| class_final_call obj=new class_final_call(); 10| obj.initionalize_value( number, length); 11| obj.final_call(); 12| } 13| }
Note: >   Second
 1| public class class_initionalize_value{ 2| static int num; 3| static int length_number; 4| static void initionalize_value( int x, int y){ 5| num=x; 6| length_number=y; 7| } 8| }
Note:  Third
 1| public class class_armostrong_number extends class_initionalize_value{ 2| static int armostrong_number(){ 3| int value=num; 4| int valu1=num; 5| int reminder; 6| int sum=0; 7| for (int i=0; i
Note: > Forth
 1| public class class_palidrom_number extends class_armostrong_number{ 2| static int palidrom_number(){ 3| int number_for_pali=num; 4| int total=0; 5| int reminder=0; 6| for (int i=0; i
Note: > Forth
 1| public class class_odd_number extends class_palidrom_number{ 2| static int odd_number(){ 3| int temp1=0; 4| if (num%2==0){ 5| temp1=temp1+1; 6| } 7| return (temp1); 8| } 9| }
Note: > Forth
 1| public class class_prime_number extends class_odd_number{ 2| static int prime_number(){ 3| int temp=0; 4| for (int i=2; i
Note: > Forth
 1| public class class_final_call extends class_prime_number{ 2| static void final_call(){ 3| if ( armostrong_number()==num){ 4| System.out.println(“This is armostrong number -> “+num); 5| } 6| if (palidrom_number()==num){ 7| System.out.println(“This is palindrome number -> “+num); 8| } 9| if (odd_number()>0){ 10| System.out.println(“This is even number-> “+num); 11| } 12| if (odd_number()<1){ 13| System.out.println(“This is odd number-> “+num); 14| } 15| if (prime_number()>0){ 16| System.out.println(“This is prime number-> “+num); 17| } 18| } 19| }

## Final comment on Prime number, Armstrong number, Even number, Palindrome number, Odd number

Above designed “Armstrong number”together with all program to get all output in a single java program. In this article, I have shown you how to simplify all java program together. Above users having the opportunity to download the program for java. Get sum of minimum and maximum.

In case of having any dought using the java code use below comment box to send to me problem query regarding the java code that I come with a possible alternative to make you better understand.

Keep connected with https://infosorce.com