File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes arithmetic promotion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "arithmetic promotion" Watch "arithmetic promotion" New topic

arithmetic promotion

luk Hann
Ranch Hand

Joined: Jan 29, 2001
Posts: 48
Please clear my doubt why no need of an explicit casting at line 1:

Michael Burke
Ranch Hand

Joined: Jul 29, 2000
Posts: 103
When you use the += operator the compiler performs an implicit cast for you.
I agree. Here's the link:
subject: arithmetic promotion
It's not a secret anymore!