posts - 325,  comments - 25,  trackbacks - 0
 public static void main(String[] args)
        {
                String str=" i am a student";
                char[] c=str.toCharArray();
        char[] temp=new char[c.length];
             for(int i=0,j=c.length-1;i<c.length;i++,j--){
                        temp[j]=c[i];
                                 }

     public static void main(String[] args)
        {
                String str = "I am a student";
                String[] str2 = str.split(" ");
                for(int i = str2.length - 1;i >= 0;i--)
                {
                        System.out.print(str2[i] + " ");
                }
                System.out.println();
        }

                System.out.println(temp);
        }
posted on 2008-08-29 09:36 长春语林科技 阅读(313) 评论(0)  编辑  收藏 所属分类: java

只有注册用户登录后才能发表评论。


网站导航:
 
<2008年8月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456

 

长春语林科技欢迎您!

常用链接

留言簿(6)

随笔分类

随笔档案

文章分类

文章档案

相册

收藏夹

搜索

  •  

最新评论

阅读排行榜

评论排行榜