Thread: Integer Usage
View Single Post
  #9 (permalink)  
Old 01-23-2008, 07:46 AM
sandeeprao.techno sandeeprao.techno is offline
Member
 
Join Date: Jan 2008
Posts: 16
sandeeprao.techno is on a distinguished road
Instead of using

System.out.println((a + b + c + d + e) / (double)5);

You can also use

System.out.println((a + b + c + d + e) / 5.0);

which is also a double value
Reply With Quote