Below is the code, when i divide 5/6,it shows 0.0 output rather 0.8333.
package sunday;
import java.util.Scanner;
public class exception {
    public static void main(String[] args) {
        int donut,milk;
        double donutperglass;
        Scanner in=new Scanner(System.in);
        try{
            System.out.println("enter donut");
            donut=in.nextInt();
            System.out.println("enter milk");
            milk=in.nextInt();
            if(milk<1)
                throw new Exception("no milk");
            donutperglass=donut/milk;
            System.out.println(donutperglass);
        }catch(Exception e){
            System.out.println(e.getMessage());
            System.out.println("go buy some milk");
        }
        System.out.println("end");
        // TODO Auto-generated method stub    
    }    
}
 
     
     
     
     
     
     
    