KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > TriadicExpr


1 /* TriadicExpr Copyright (C) 1998-1999 Jochen Hoenicke.
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2, or (at your option)
6  * any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; see the file COPYING. If not, write to
15  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
16  *
17  * $Id: TriadicExpr.java,v 1.3 1999/08/19 15:16:59 jochen Exp $
18  */

19
20
21 public class TriadicExpr {
22     int a,b,c,d,e,f,g,h,i,j;
23     boolean bool;
24
25     void test() {
26         if( (a< b ? bool : (a<b)))
27             a=b;
28         else
29             b=a;
30
31         if ((a<b?b<a:i<j) ? (c<d ? e<f : g < h) : (j<i ? h<g:f<e))
32             a=(b<a ? g : h);
33         else
34             b=a;
35     }
36 }
37
38
39
Popular Tags