How did you go about testing your program? What were the results of that testing?
As it was my goal to, today I worked on mastering the number operations on java. I worked on practice problems so that I would get used to the methods. I wrote a program to see what the results turnout to be and I realized the importance and purpose of Casting. Look at the following coads :
double d=61/20; // this would make d 3.0. However,
double d=(double)61/20; // would be 20.3333333333
This shows how crucial Casting is. I also learned other methods and writing and testing my program helped me learn even more.
Thursday, September 20, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment