Slope of the line parallel to the line with the given slope | Java implementation of the approach ; Function to return the slope of the line which is parallel to the line with the given slope ; Driver code
class GfG { static double getSlope ( double m ) { return m ; } public static void main ( String [ ] args ) { double m = 2 ; System . out . println ( getSlope ( m ) ) ; } }