Chinaunix首页 | 论坛 | 博客
  • 博客访问: 327346
  • 博文数量: 96
  • 博客积分: 2041
  • 博客等级: 大尉
  • 技术积分: 1080
  • 用 户 组: 普通用户
  • 注册时间: 2012-01-20 14:08
文章分类

全部博文(96)

文章存档

2015年(2)

2013年(1)

2012年(93)

分类: Java

2012-02-01 15:48:47

public class Replace
{

    public  static String replace(String input)
    {
        return input.replace("l", "x") ; //将hello 变为hellx
        //若input.replace("ll","a") ;则显示heao ; 若helllo则healo
        //若input.replace("l","x") ;则显示hexkxo
    }
    public static void main(String[] args)
    {
        System.out.println(replace("hello"));

    }
}

阅读(1402) | 评论(0) | 转发(0) |
0

上一篇:创业中犯的错误

下一篇:DAO

给主人留下些什么吧!~~