When I use printf it gives me "???"
import java.util.Scanner;
public class Homework {
public static void main(String[] args) {
Scanner kbScanner=new Scanner(System.in);
double m,c , m2 , c2;
System.out.println("Enter the coefficients of the first line: ");
m= kbScanner.nextDouble();
c= kbScanner.nextDouble();
System.out.printf("The first line equation is: y = %.1f x + %.1f \n" , m,c );
}
}
OUTPUT: Enter the coefficients of the first line:
1 2
The first line equation is: y = ??? x + ???
WHY? How can I fix it?