Check if roots of a Quadratic Equation are numerically equal but opposite in sign or not | Java program to check if roots of a Quadratic Equation are numerically equal but opposite in sign or not ; Function to find the required answer ; Driver code
import java . util . * ; class GFG { static void checkSolution ( int a , int b , int c ) { if ( b == 0 ) System . out . print ( " Yes " ) ; else System . out . print ( " No " ) ; } public static void main ( String args [ ] ) { int a = 2 , b = 0 , c = 2 ; checkSolution ( a , b , c ) ; } }