Java | Operators | Question 4
class Test { public static void main(String args[]) { System.out.println(10*20 + "GeeksQuiz"); System.out.println("GeeksQuiz" + 10*20); } } |
chevron_right
filter_none
(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
Recommended Posts:
- Java | Operators | Question 7
- Java | Operators | Question 2
- Java | Operators | Question 5
- Java | Operators | Question 6
- Java | Operators | Question 9
- Java | Operators | Question 1
- Java | Operators | Question 8
- Java | Operators | Question 3
- Operators in Java
- Bitwise operators in Java
- Bitwise right shift operators in Java
- Compound assignment operators in Java
- Operators in C | Set 2 (Relational and Logical Operators)
- C | Operators | Question 12
- C | Operators | Question 13




