Results 1 to 3 of 3
Thread: string addition??
- 09-03-2008, 09:59 AM #1
- 09-03-2008, 10:15 AM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
Integer.parseInt(a) + .....
- 09-03-2008, 03:41 PM #3
One of the confusing things for beginners. The meaning of the + operator depends on where/how it's used. When used with primiitives like int or long it means: arithmetic sum ie add the values of the two numbers and return their sum.
When used between Strings, it means: concatenate the two strings and return a new String with the 2 strings concatentated. That is what you observed.
Similar Threads
-
jTextField Simpe Addition - how to ? - Netbeans 6.0
By jesicapalma in forum NetBeansReplies: 4Last Post: 05-24-2010, 09:21 AM -
trying to do a cumulative addition and getting a null pointer exception
By alwin in forum New To JavaReplies: 2Last Post: 06-02-2008, 05:30 PM -
Binary Addition
By Deo Favente in forum Advanced JavaReplies: 11Last Post: 04-24-2008, 05:34 AM -
Addition program that displays the sum of two numbers
By Java Tip in forum Java TipReplies: 0Last Post: 03-28-2008, 08:46 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks