These two statements create two constants TRUE and FALSE (Java constants are captialised by convention). These constants are members of the Boolean class, with values true and false respectively.
Back in the old days befor Java 1.5 the compiler would not convert automatically between Boolean (the class) members and boolean (primitive) values, so it was useful to have constants for the class members. Now Java will autobox true and false into Boolean class members automatically this is no longer of any great use.
ps sridhar123:
if (isWindows == true)
is a dumb way of saying
if (isWindows)
Reputation Points: 1939
Solved Threads: 955
Posting Expert
Online 5,816 posts
since Apr 2008