Length of the direct common tangent between two externally touching circles | Java program to find the length of the direct common tangent between two circles which externally touch each other ; Function to find the length of the direct common tangent ; Driver code
class GFG { static void lengtang ( double r1 , double r2 ) { System . out . println ( " The ▁ length ▁ of ▁ the ▁ " + " direct ▁ common ▁ tangent ▁ is ▁ " + ( 2 * Math . sqrt ( r1 * r2 ) ) ) ; } public static void main ( String [ ] args ) { double r1 = 5 , r2 = 9 ; lengtang ( r1 , r2 ) ; } }