Issue while using printf statement in Java VS code

Viewed 31

I have an issue while using printf statement in vs code the output is showing me an error "???" and I don't know why.

This is my code:

public class first{
    public static void main(String[] args) {
        int num1 = 1;
        double num2 = 2.56;
        double sum = (double) num1 + num2;
        System.out.printf("sum is: %.1f" ,sum);
    }
}

Output of my program:

output of my program

0 Answers
Related