Open In App

Java | Operators | Question 4

Last Updated : 28 Jun, 2021
Like Article
Like
Save
Share
Report




class Test {
    public static void main(String args[])  {
       System.out.println(10*20 + "GeeksQuiz");
       System.out.println("GeeksQuiz" + 10*20);
   
}


(A)

10*20GeeksQuiz
GeeksQuiz10*20

(B)

200GeeksQuiz
GeeksQuiz200

(C)

200GeeksQuiz
GeeksQuiz10*20

(D)

1020GeeksQuiz
GeeksQuiz220


Answer: (B)

Explanation: Precedence of * is more than +.

Quiz of this Question


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads