Results 1 to 10 of 10
- 01-05-2013, 01:38 PM #1
Member
- Join Date
- Nov 2011
- Posts
- 76
- Rep Power
- 0
- 01-05-2013, 02:25 PM #2
AN21XX
- Join Date
- Mar 2012
- Location
- Munich
- Posts
- 297
- Rep Power
- 2
Re: What does converting a string to long means?
It means you parse a character sequence to a computer usable format of a number.
Java Code:String sMyString = "412312315134"; long iMyLong = Long.parseLong( sMyString );
I like likes!.gif)
- 01-11-2013, 07:52 PM #3
Member
- Join Date
- Nov 2011
- Posts
- 76
- Rep Power
- 0
Re: What does converting a string to long means?
I know adding two numbers represented as string is not possible but why are we declaring numbers as a String if we know that we have to add them in future? I hope you understand my question.
Also closing someones thread without understanding his/her question properly is not appropriate.
- 01-11-2013, 07:55 PM #4
Re: What does converting a string to long means?
You're right. That makes no sense. Who wrote the code that is doing that? Did they add any comments explaining why they did it that way?why are we declaring numbers as a String if we know that we have to add them in future?If you don't understand my response, don't ignore it, ask a question.
- 01-11-2013, 08:04 PM #5
Member
- Join Date
- Nov 2011
- Posts
- 76
- Rep Power
- 0
Re: What does converting a string to long means?
No, that's my question. That's what I asked why would there be a need of converting String to long at all?
- 01-11-2013, 08:15 PM #6
Re: What does converting a string to long means?
If it were read from a text file, it would be a String.
Or if it were typed into a textfield.If you don't understand my response, don't ignore it, ask a question.
- 01-11-2013, 08:16 PM #7
AN21XX
- Join Date
- Mar 2012
- Location
- Munich
- Posts
- 297
- Rep Power
- 2
Re: What does converting a string to long means?
Sadly those stupid users today have difficulties in communicating binary via RS232... actually keyboards would be a lot simpler if people could do that. So maybe you should google about ASCII and the evolution of the human interface.
I like likes!.gif)
- 01-11-2013, 08:35 PM #8
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,429
- Blog Entries
- 7
- Rep Power
- 17
Re: What does converting a string to long means?
If you mean your other identical thread: believe me, Darryl understood very well what this question is all about and double posts are closed (I usually merge them with the other thread or, when no replies are given yet, I simply remove them). Don't double post anymore.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 01-12-2013, 06:43 AM #9
Member
- Join Date
- Nov 2011
- Posts
- 76
- Rep Power
- 0
- 01-12-2013, 06:44 AM #10
Member
- Join Date
- Nov 2011
- Posts
- 76
- Rep Power
- 0
Similar Threads
-
String to Long
By PhQ in forum New To JavaReplies: 4Last Post: 01-04-2013, 04:18 PM -
Converting unsigned long to java
By radhika.putty in forum Advanced JavaReplies: 2Last Post: 04-01-2011, 05:31 AM -
Converting from long to int
By peterhabe in forum New To JavaReplies: 2Last Post: 02-20-2011, 06:14 PM -
stumpt. converting an object to a long int.
By root_demon in forum New To JavaReplies: 7Last Post: 10-31-2008, 05:32 AM -
Error: convert from String to long
By bbq in forum New To JavaReplies: 1Last Post: 06-29-2007, 07:23 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks