Hi AJ thanks for ur kind reply....

Here i need one more....

output:

one
1
two
2
three
3

i want separate this like :one,two,three in list

the list like this
 one
 two
 three

when i click the one it will display 1(it the corresponding value shown in
output) when i click two it should display 2....

 i want to separate string values and integer values...when i access string
value it should tell corresponding integer values...

Thanks in Advance,

Raghav.S



On Sat, Oct 10, 2009 at 2:41 PM, AJ <ajeet.invinci...@gmail.com> wrote:

>
> Hi Raghav
>
> See the following code:
>
>
> --------------------------------------------------------------------------------
>        StringBuffer sb = new StringBuffer();
>        String str="one.1.two.2.three.3";
>
>        Pattern p =Pattern.compile("[.\\d.]");
>        String[] items = p.split(str);
>        for(String s : items) {
>                sb.append(s);
>                sb.append("\n");
>        }
>        System.out.println(sb.toString());
>
>
> --------------------------------------------------------------------------------
>
> hope this helps you.
>
> Thanks,
> AJ
>
> On Oct 10, 1:47 pm, ragavendran s <sraghav.ra...@gmail.com> wrote:
> > Sorry
> > Here is my Revised Code....
> >
> > problem in StringTokenizer
> >
> > String str="one.1.two.2.three.3"
> > StringBuffer sb;
> > Stringtokenizer tok=new Stringtokenizer(str);
> > while(tok.hasmoreTokens())
> > {
> >  sb.append(tok.nextToken);
> >
> > }
> >
> > Sustem.out.println(sb.toString());
> >
> > output:
> >
> > one
> > 1
> > two
> > 2
> > three
> > 3
> >
> > but i need output like this:
> > one
> > two
> > three
> >
> > i want to cut the values 1,2,3
> >
> > Thanks in Advance
> > Raghav.S
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to