aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes assignments and + operator 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 "assignments and + operator" Watch "assignments and + operator" New topic
Author

assignments and + operator

Phungsuk Wangdu
Ranch Hand

Joined: Nov 04, 2009
Posts: 114


this code doesnt compile
well my question is how does "+" works here?? as concatenation or addition
and why doesn't it compile because i think that the c value 88 and 5 must be added and could be casted in a char??
and if we directly cast an int in a char it works then why it doesnt work
Raju Champaklal
Ranch Hand

Joined: Dec 10, 2009
Posts: 521
tyr this (char)(c+i)


scjp 1.6 91%, preparing for scmad
"Time to get MAD now.. we will get even later"....by someone unknown
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

or try


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Phungsuk Wangdu
Ranch Hand

Joined: Nov 04, 2009
Posts: 114
thanks silly mistake
Raju Champaklal
Ranch Hand

Joined: Dec 10, 2009
Posts: 521
your welcome
 
 
subject: assignments and + operator