Slope of perpendicular to line | Java program find slope of perpendicular line ; Function to find the Slope of other line ; Driver code
import java . io . * ; import java . util . * ; class GFG { static double findPCSlope ( double m ) { return - 1.0 / m ; } public static void main ( String [ ] args ) { double m = 2.0 ; System . out . println ( findPCSlope ( m ) ) ; } }