Answer:
public static void quad(double a, double b, double c) {
double D = (Math.pow(b, 2)) - (4 * a * c);
if (D<0){
System.out.println("no real solutions");
}
}
Step-by-step explanation:
The code snippet above implements the function in Java programming language
As required by the question, the line double D = (Math.pow(b, 2)) - (4 * a * c); evaluates b squared" - 4ac and assignes the value to the variable D
An if statement is used to test if D is less than 0, if this is true the message no real solutions is printed