|
What result comes when we compile and run following code:
public class R4RSCJPTest
{
public static void main(String args[])
{
boolean boo = true;
int i;
if(boo)
i = boo ? 3: 2;
else
i = boo ? 4: 1;
System.out.println("Value of i is " +i);
}
},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[])
{
boolean boo = true;
int i;
if(boo)
i = boo ? 3: 2;
else
i = boo ? 4: 1;
System.out.println("Value of i is " +i);
}
}
|