1 public class TertiaryTest {
2 static public void main( String[] args ) {
4 int y = x<5 ? 6 : 1000;
5 int z = x>1 ? y>7 ? 2000 : 8 : 3000;
6 System.printString( "x should be 3: "+x+"\n" );
7 System.printString( "y should be 6: "+y+"\n" );
8 System.printString( "z should be 8: "+z+"\n" );