The correct answer to the question “What will be the output of the following Java program” is option (d). 60, 30, 0, 20, 0. And all the other options are incorrect. If you wish to learn Java and then get trained, by enrolling in Intellipaat’s Java certification course. Also, look at the latest YouTube video on Java Interview Questions and Answers.