Hi ALL,
Here I wrote a program for Relational Operator And Conditional Operator in java.
/**
*
* @author Balamurgan
M
*/
public class AndORoperator {
public static void
main(String arg[]){
int x=1;
int y=1;
int z=1;
if((x>1)&(x++ <10))
System.out.println(" x value "+x);
if((1>y)&&(1> y++))
System.out.println(" y value "+y);
if((1==z)|(10> z++))
System.out.println(" z value "+z);
}
}
No comments:
Post a Comment