Maximum points of intersection n lines | Java program to find maximum intersecting points ; nC2 = ( n ) * ( n - 1 ) / 2 ; ; Driver code ; n is number of line
public class GFG { static long countMaxIntersect ( long n ) { return ( n ) * ( n - 1 ) / 2 ; } public static void main ( String args [ ] ) { long n = 8 ; System . out . println ( countMaxIntersect ( n ) ) ; } }