Java Program for Program to calculate volume of a Tetrahedron Last Updated : 07 Aug, 2022 Comments Improve Suggest changes Like Article Like Report A Tetrahedron is simply a pyramid with a triangular base. It is a solid object with four triangular faces, three on the sides or lateral faces, one on the bottom of the base and four vertices or corners. If the faces are all congruent equilateral triangles, then the tetrahedron is called regular. The volume of the tetrahedron can be found by using the following formula : Volume = a3/(6√2) Examples : Input : side = 3 Output: 3.18 Input : side = 20 Output: 942.81 Java // Java code to find the volume of a tetrahedron import java.io.*; class Tetrahedron { // Function to calculate volume static double vol_tetra(int side) { double volume = (Math.pow(side, 3) / (6 * Math.sqrt(2))); return volume; } // Driver Code public static void main(String[] args) { int side = 3; double vol = vol_tetra(side); vol = (double)Math.round(vol * 100) / 100; System.out.println(vol); } } Output3.18Time Complexity: O(1) Space Complexity: O(1) Comment More infoAdvertise with us Next Article Java Program for Program to calculate volume of a Tetrahedron K kartik Follow Improve Article Tags : Java area-volume-programs Practice Tags : Java Similar Reads Program to calculate area and volume of a Tetrahedron A Tetrahedron is simply a pyramid with a triangular base. It is a solid object with four triangular faces, three on the sides or lateral faces, one on the bottom or the base and four vertices or corners. If the faces are all congruent equilateral triangles, then the tetrahedron is called regular. Th 5 min read Program to calculate volume of Octahedron Given the side of the Octahedron then calculate the volume of Octahedron. Examples: Input : 3 Output : 12.7279 Input : 7 Output : 161.692 Approach: The volume of an octahedron is given by the formula: Volume = â2/3 à a3 where a is the side of Octahedron Below is the implementation to calculate volum 2 min read Program to calculate Volume and Surface area of Hemisphere Calculate volume and surface area of a hemisphere. Hemisphere : In geometry, it is an exact half of a sphere. We can find many of the real life examples of the hemispheres such as our planet Earth can be divided into two hemisphere the southern & northern hemispheres.  Volume of Hemisphere : Vo 4 min read Program to calculate volume of Ellipsoid Ellipsoid, closed surface of which all plane cross sections are either ellipses or circles. An ellipsoid is symmetrical about three mutually perpendicular axes that intersect at the center. It is a three-dimensional, closed geometric shape, all planar sections of which are ellipses or circles. An el 4 min read Program for Volume and Surface Area of Cube Cube is a 3-dimensional box-like figure represented in the 3-dimensional plane. Cube has 6 squared-shape equal faces. Each face meet another face at 90 degree each. Three sides of cube meet at same vertex. Examples: Input : Side of a cube = 2 Output : Area = 8 Total surface area = 24 Input : Side of 3 min read Like