Back
While executing this piece of code, i am getting output as 0.
public static void main(String[] args) { double g = 1 / 3; System.out.printf("%.2f", g);
How can I solve this?
31k questions
32.8k answers
501 comments
693 users