ternary operator (also called the conditional operator) is to assign the minimum (or maximum)

import java.io.*;
public class Test_this {

/**
* @param args
*/
public static void main(String[] args) throws IOException
{
// TODO Auto-generated method stub
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String str = "";
try{
System.out.println("---While Loop---");
System.out.print("Please enter your age: ");
str = br.readLine();
int n =Integer.parseInt(str);
int i=12 ;
boolean max;
max = (i <= n) ? true : false;
if (max){
System.out.print("You are allowed in this ride: ");
}
else
{
System.out.print("sorry you cant' go in ths ride: ");
}
System.out.println();
}//try
catch(NumberFormatException e) { System.out.println("data was blank");}

}

}