Home » Java Programming » Flow Control

What will be the output of the program? boolean bool = true; if(bool = false) /* Line 2 */ { System.out.println("a"); } else if(bool) /* Line 6 */ { System.out.println("b"); } else if(!bool) /* Line 10 */ { System.out.println("c"); /* Line 12 */ } else { System.out.println("d"); }

← Previous Next →

Discussion & Comments

No comments yet. Be the first to comment!