jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes Which different between these two methods please? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Which different between these two methods please?" Watch "Which different between these two methods please?" New topic
Author

Which different between these two methods please?

André Asantos
Ranch Hand

Joined: Nov 23, 2009
Posts: 234
Which different between these two methods please?

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

somarValores adds two numbers, like 1+2=3. soma performs a binary AND, like 0110 & 1100 = 0100 (see this).


[My Blog]
All roads lead to JavaRanch
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19672
    
  18

These are definitely not the same. For example, 1 + 1 == 2 while 1 & 1 == 1.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

...not to mention the return types.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
wood burning stoves
 
subject: Which different between these two methods please?