What can you add at LINE 4 to make the program print Percent Complete = 56.79?
class ExamPrep {
public static void main(String[] args){
double a = 56.785;
// LINE 4
System.out.println(result);
}
}
Choose the correct answer:
A. String result = String.format("Percent Complete = %d", a);
B. String result = String.format("Percent Complete = %.2d", a); C. String result = String.format("Percent Complete = %f", a);
D. String result = String.format("Percent Complete = %.2f", a);
E. String result = String.format("Percent Complete = %s", a);
F. String result = String.format("Percent Complete = %.2s", a);