Operators and Assignments Questions and Answers
In Java programming, Operators and Assignments form the backbone of logical and arithmetic operations. This concept frequently appears in programming questions and answers, particularly Java MCQs featured in company tests by TCS, Infosys, and Wipro. Java provides various operators—arithmetic, relational, logical, and bitwise—that allow developers to manipulate data and control program flow effectively. Understanding operator precedence, associativity, and assignment rules ensures accurate computations and reduces coding errors. Practicing Java programming interview questions with answers on operators and assignments helps students develop problem-solving skills necessary for coding challenges and technical interviews.
Operators and Assignments
Showing 10 of
38 questions
32. What does a >>> 2 perform?
- Signed right shift
- Unsigned right shift
- Left shift
- XOR operation
35. What is printed?System.out.println(10 == 10.0);
- true
- false
- Compilation error
- Runtime error
36. Which of these is not a valid assignment?
- int a = 10;
- char c = "a";
- double d = 20;
- float f = 2.5f;