Java Program to Read a Grade and Display the Equivalent Description

This is a Java Program to Read a Grade & Display the Equivalent Description. Enter the grade of student as input. After that we match the character grade of student against the given cases using equal to operator (==) and hence generate the desired output. Here is the source code of the Java Program to … Read more

advertisement

Java Program to Accept the Height of a Person and Categorize as Taller, Dwarf & Average

This is a Java Program to Accept the Height of a Person & Categorize as Taller, Dwarf & Average. Enter any integer number as input. After that we match that input against different cases. If the input matches against any of the given cases then we generate the desired output. Here is the source code … Read more

advertisement

Java Program to Convert Days into Years, Months and Days

This is a Java Program to Convert a Given Number of Days in terms of Years, Weeks & Days. Enter any integer number as an input. After that we first divide the input by 365 to get number of years. After that we use modulus opeartion and division by 7 to get number of weeks. … Read more

advertisement

Java Program to Check if Two Numbers are Equal

This is a Java Program to Accept two Integers and Check if they are Equal. Enter two integer numbers as input. After that we match both the inputs with the help of equal to(==) operator. Hence we generate the output accordingly. Here is the source code of the Java Program to Accept two Integers and … Read more

advertisement

Sum of Digits Program in Java

This is a Java Program to Compute the Sum of Digits in a given Integer. Enter any integer number as input. After that we use modulus and division operation respectively to find the sum of digits of number as output. Here is the source code of the Java Program to Compute the Sum of Digits … Read more

advertisement

Java Program to Illustrate how User Authentication is Done

This is a Java Program to Illustrate how User Authentication is Done. Enter username and password as input strings. After that we match both strings against given username and password. If it matches then Authentication is successfull or else Authentication fails. Here is the source code of the Java Program to Illustrate how User Authentication … Read more

advertisement

Java Program to Swap Two Numbers

Swapping two numbers in Java programming means swapping the values of two variables, which can be done using a temporary variable or without using a temporary variable. Swapping values is useful in programming, such as sorting or reordering elements in an array. Example: There are two variables m & n. Value of m is “4” … Read more

advertisement

Java Program to Reverse a Number

Reversing a number in Java means taking a number and producing a new number with its digits in the opposite order. For example, if the given number is “1234”, then the reverse number will be “4321”. Problem Description Write a Java Program to find the reverse of the number. Problem Solution 1. Enter any integer … Read more

advertisement

Java Program to Check Whether a Number is Positive or Negative

This is a Java Program to Check if a Given Integer is Positive or Negative. Enter any integer number as an input. Now we check whether the given number is greater than zero or not. If the given number is greater than zero than it is positve. If it is less than zero than it … Read more

advertisement

Java Program to Reverse a Number using Recursion

This is a Java Program to Find Reverse of a Number using Recursion. Enter any integer number as an input. After that we count the number of digits in the given input. The given number along with length of that number is passed to the other function where by using recursion we get the reverse … 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.