Java Program to Find the Area of Parallelogram

This is the Java Program to Find the Area of a Parallelogram. Problem Description Given the dimensions of a parallelogram, find out its area. Problem Solution The area of a parallelogram can be calculated using the formula: Area = base*height. Program/Source Code Here is the source code of the Java Program to Find the Area … Read more

advertisement

Java Program to Check Armstrong Number

An Armstrong Number in Java is a unique integer where the sum of the cubes of its individual digits equals the number itself. Examples of Armstrong numbers include 0, 1, 153, 370, 371, 407, and more. How to Identify Armstrong Numbers? Identifying Armstrong numbers involves a simple algorithm: Count the number of digits (n) in … Read more

advertisement

Java Program to Find Volume and Surface Area of Cuboids

This is the Java Program to Find the Surface Area and Volume of a Cuboid. Problem Description Given the dimensions of a cuboid, find out its surface area and volume. Problem Solution The surface area and volume of a cuboid can be calculated using the formulas: Surface Area = 2*(length*breadth + breadth*height + height*length). Volume … Read more

advertisement

Java Program to Find Volume and Surface Area of Cone

This is the Java Program to Find the Surface Area and Volume of a Cone. Problem Description Given the dimensions of a cone, find out its surface area and volume. Problem Solution The surface area and volume of a cone can be calculated using the formulas: Surface Area = (PI * radius * slant height) … Read more

advertisement

Java Program to Find the Perimeter of a Circle, Rectangle and Triangle

This is a Java Program to Find the Perimeter of a Circle, Rectangle and Triangle. formula: Perimeter of circle=2*pi*r Perimeter of rectangle=2*(l+b) Perimeter of triangle=(s1+s2+s3) Enter the radius of the circle, length and breadth of the rectangle and three sides of the triangle as inputs. Calculate the perimeter by using formula and get the desired … Read more

advertisement

Java Program to Find Volume and Surface Area of Sphere

This is the Java Program to Find the Surface Area and Volume of a Sphere. Problem Description Given the dimensions of a sphere, find out its surface area and volume. Problem Solution The surface area and volume of a sphere can be calculated using the formulas: Surface Area = 4 * PI * (radius3) /3. … Read more

advertisement

Java Program to Find the Area and Perimeter of Rectangle using Class

This is a Java Program to Create a Simple Class to Find out the Area and Perimeter of Rectangle. Formula: Perimeter of rectangle = 2 * (length + breadth) Area of rectangle = length * breadth Enter the length and breadth of the rectangle as input. Now we use the given formula to calculate the … Read more

advertisement

Java Program to Find the Roots of a Quadratic Equation

This is the Java Program to Find the Roots of a Quadratic Equation. Problem Description Given the coefficients of the quadratic equation, write a Java Program to Find the roots of the quadratic equation. Problem Solution Calculate the determinant using the formula B2 – 4*A*C, and then according to its value calculate the roots, whether … Read more

advertisement

Java Program to Add the nth Square Series

This is a Java Program to Add the nth Square Series. Enter the number of terms upto which you want to add the series as an input. Now we use for loop to get the desired output. Here is the source code of the Java Program to Add the nth Square Series. The Java program … Read more

advertisement

Java Program to Print Armstrong Number between 1 to 1000

This is a Java Program to Print Armstrong Number from 1 to 1000. Armstrong Number is an integer such that the sum of the cubes of its digits is equal to the number itself. We use the Modulo and division operation along with loops and if conditions to get the desired output. Here is the … 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.