Posts

Showing posts with the label java puzzle variable declaration

Java Puzzle – Variable Declaration

In Java, how will you declare a variable x such that the following two conditions are satisfied? 1.     x = ++x  is valid 2.     x = x + 1 is invalid          Leave your code in Comments ...