I have the following code:
import java.util.*; public class Test { public static void main(String[] args) { boolean b = false; if (b=true) System.out.println("one. b = false"); if (b) System.out.println("two. b = false"); } } The output is:
one. b = false two. b = false I set b equal to false so why does it print the statement for when b is true?