Java Program to Check Whether a Given Number is Even or Odd

This is a Java Program to Check if a Given Integer is Odd or Even. Enter any integer number as an input. Now we check its remainder with modulo operator by two. If remainder is zero the given number is even. If remainder is 1 then the given number is odd. Hence we show output … Read more

advertisement

Java Program to Check Whether a Character is a Vowel, Consonant or Digit

This is a Java Program to Check if a Given Character is Vowel or Consonant. Enter any character as an input. Now we match this character with the already defined vowels in switch case. If the given character matches with any of the vowels then output generated is vowel or else consonant as in a … Read more

advertisement

Java Program to Find the Sum of Even and Odd Numbers

This is a Java Program to Calculate the Sum of Odd & Even Numbers. Enter the number of elements you want in array. Now enter all the elements you want in that array. We begin from the first element and check if it is odd or even. Hence we add that number into the required … Read more

advertisement

Java Program to Find the Largest Number Among Three Numbers

This is a Java Program to Find the Biggest of 3 Numbers. Enter any three integer numbers as an input. Now we check the first number against the second and third number. If it false then we check for second number against third. If it is also false then accordingly third number will be declared … Read more

advertisement

Java Program to Print Binary Equivalent of an Integer using Recursion

This is a Java Program to Print Binary Equivalent of an Integer using Recursion. Enter any integer number as an input. After that we pass the given number to the other function where by using modulo operator along with recursion we get the reverse of a number as an output. Here is the source code … Read more

advertisement

Java Program to Find Sum of Digits of a Number using Recursion

This is a Java Program to Find Sum of Digits of a Number using Recursion. Enter any Decimal number as an input. Now we pass that number to a new functon where we use modulo operator to find sum of digits as ouput along with the help of recursion. Here is the source code of … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.