Saw an error of the form: if(something = somethingelse) which won't compile.
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
posted
0
"wek", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements. Thanks.
So yes, that will compile, and it will be printed, but it's not comparing two things. It's assigning true to b, and then self-checking the expression 'b'. What was your point exactly?
Matts Smith
Ranch Hand
Joined: Feb 03, 2001
Posts: 113
posted
0
if(something = somethingelse) which won't compile.
I was just pointing out it is possibly a boolean assignment.