Results 1 to 7 of 7
Thread: Array issues
- 10-07-2008, 09:48 AM #1
Member
- Join Date
- Oct 2008
- Posts
- 3
- Rep Power
- 0
Array issues
Hi everybody,
I'm first time on that forum. I have a question.
Let's say I have an array
I got the following message:Java Code:String[] msgs; System.out.println("posx1 = " + msgs[0]); System.out.println("posx2 = " + msgs[1]);
MSG(TAG): tagid=10, posx=83, posy=55
MSG(TAG): tagid=11, posx=22, posy=12
How can I get just the number for posx and posy from that array? Any idea?
- 10-07-2008, 10:00 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
So you get two strings there. So what you have to do is, sub string the original one or use regular expression.
- 10-07-2008, 10:03 AM #3
Parse the String using indexOf and substring and Integer.parseInt.
db
- 10-07-2008, 10:04 AM #4
Member
- Join Date
- Oct 2008
- Posts
- 3
- Rep Power
- 0
OK, but what do you mean by regular expression?
- 10-07-2008, 10:17 AM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Regular expression is kind of a way that syntactically analyzed elements used to match patterns of text
- 10-07-2008, 10:53 AM #6
- 10-07-2008, 11:05 AM #7
Member
- Join Date
- Oct 2008
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
Array traversal issues
By sondratheloser in forum New To JavaReplies: 3Last Post: 08-13-2012, 12:49 AM -
iterator issues
By orchid in forum New To JavaReplies: 2Last Post: 08-12-2008, 01:43 PM -
Issues with Jva I.O
By Annatar01 in forum New To JavaReplies: 0Last Post: 02-08-2008, 01:16 AM -
Array issues
By Neo82 in forum New To JavaReplies: 1Last Post: 12-31-2007, 03:22 AM -
jcheckbox issues need help. thanks.
By carlos123 in forum New To JavaReplies: 3Last Post: 11-05-2007, 10:37 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks