import java.util.Scanner;
public class Collision{
public static void main(String[] args){
int x=0;
System.out.println(" ONE WAY \nDo Not Take a U Turn");
Scanner inp=new Scanner(System.in);
x=inp.nextInt();
try{
if(x>0){
throw new Exception("Please Stop Immediately In Order To Avoide Collision");
}
else{
System.out.println("Have a Safe Journey");
}
}
catch (Exception ex){
System.out.println(ex.getMessage());
}
}
}
No comments:
Post a Comment