This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes ++ needs an explicit cast Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "++ needs an explicit cast" Watch "++ needs an explicit cast" New topic

++ needs an explicit cast

Ranch Hand

Joined: Aug 17, 2000
Posts: 45
byte b = ++7; is valid
byte b1 = 7;
byte b2 = ++b1; needs an explicit case
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
No, I think ++ and -- works fine for byte type, and I tried it, it's OK.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: ++ needs an explicit cast
It's not a secret anymore!