ppl,
this is a question on operators:
class EBH202 {
static boolean a, b, c;
public static void main (
String[] args) {
boolean x = (a = true) || (b = true) && (c = true);
System.out.print(a + "," + b + "," + c);
}}
What will be the output of the program:
the answer is given as true,false, false.
but before applying ||,&& the assignment expressions
in () shud be executed. what do ya say? then the output
should be true, true, true. But, i executed the program
it displays true, false, false.
can someone give me the logical explanation for this?
Sriram.