Question: I have this class 

```
class Cars implements Transport, Serializable, Cloneable {
   private String type;
   private Models[] cars;
   private int number;
   private static final long serialVersionUID = 1L;

   Cars(String type, int number){
       this.type = type;
       this.number = number;
       cars = new Models[number];
       for (int i = 0; i < number; i++){
           cars[i] = new Models("default"+i, Double.NaN);
       }
   }
    private class Models implements Serializable{
       private String model;
       private double price;

```

and i need to override clone() for deep copying this object with using super.clone(). How can i do this?

Answer: 
The allowed[] array contains all zeroes. So if you input any value say x , where
 0 >= x >= INT\_MAX your code would print "Exited with 0".
Any negative number should print "Accepted". May be a logical bug you have in your code.

I ran your code in Xcode. Try debugging using breakpoints if that helps.
Usual way is to add breakpoint at the closing brace to check the result before exiting.

Another way is to go Tools > Options > Debugging and uncheck "Automatically close the console when debugging stops".