Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

why double width 50 110000 the output is 0 000000000000000


why double width 50 110000 the output is 0 000000000000000  using -'java'

This is my code :

double width = 50/110000;
System.out.println("width ori is "+width );


And the output is: 0.00000000000

What's wrong ? the expected output has to be 4.5454545454545455E-4

Any body can explain to me why?
    

asked Sep 22, 2015 by sanjaypal1983
0 votes
12 views



Related Hot Questions



Government Jobs Opening


...