Equation of straight line passing through a given point which bisects it into two equal line segments | Java implementation of the approach ; Function to print the equation of the required line ; Driver code
class GFG { static void line ( double x0 , double y0 ) { double c = ( int ) ( 2 * y0 * x0 ) ; System . out . println ( y0 + " x " + " ▁ + ▁ " + x0 + " y ▁ = ▁ " + c ) ; } public static void main ( String [ ] args ) { double x0 = 4 , y0 = 3 ; line ( x0 , y0 ) ; } }