Find the height of a right | Java implementation of the approach ; Function to return the height of the right - angled triangle whose area is X times its base ; Driver code
import java . util . * ; import java . lang . * ; import java . io . * ; class Gfg { static int getHeight ( int X ) { return ( 2 * X ) ; } public static void main ( String [ ] args ) throws java . lang . Exception { int X = 35 ; System . out . println ( getHeight ( X ) ) ; } }