I'm trying to compile code that I know to be working on other peoples' machines but is throwing a particular error on my system. Specifically the error relates to the printf() method
The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, double)
For instance
public static void main(String[] args) {
double rate =10.5;
System.out.printf("%.3f", rate);
}
Does anyone know why this error is cropping up? There are alternatives to using printf(), but this is very annoying!
new Object[] {rate}.