Class Foozit {
public static void main(String args[]) {
Integer x=0;
Integer y=0;
for(short z=0;z<5;z++)
if((++x>2)||(++y>2))
// it is the speciality of short circuit OR operator '||' i.e. it checks the the left condition first ,if it is
// true then it does not check the right one .i.e. y is not incremented after 2 since the left one
// condition is true
x++;
System.out.println(x+ "" +y);
}
}

If you've never used an object-oriented programming language before, you'll need to learn a few basic concepts before you can begin writing any code. This lesson will introduce you to objects, classes, inheritance, interfaces, and packages. Each discussion focuses on how these concepts relate to the real world, while simultaneously providing an introduction to the syntax of the Java programming language..........