|
What result comes when we compile and run following code:
public class R4RSCJPTest
{
public static void main(String args[])
{
int i = 1;
int j = 0;
boolean boo = true;
boolean boo1;
boo1 = (boo && 0<(i+=2));
boo1 = (boo && 0<(i+=1));
boo1 = (boo && 0<(j+=2));
boo1 = (boo || 0<(j+=1));
System.out.println("Value of i is " + i + ", Value of
j is " + j );
}
}
,Java, C ,C++, ASP, ASP.net C# ,Struts ,Questions & Answer, Struts2, Ajax, Hibernate, Swing ,JSP , Servlet, J2EE ,Core Java ,Stping, VC++,
HTML, DHTML, JAVASCRIPT, VB ,CSS, interview ,questions, and answers, for,experienced, and fresher
What result comes when we compile and run following code:
public class R4RSCJPTest
{
public static void main(String args[])
{
int i = 1;
int j = 0;
boolean boo = true;
boolean boo1;
boo1 = (boo && 0<(i+=2));
boo1 = (boo && 0<(i+=1));
boo1 = (boo && 0<(j+=2));
boo1 = (boo || 0<(j+=1));
System.out.println("Value of i is " + i + ", Value of
j is " + j );
}
}
|