米字键

博客园 首页 新随笔 联系 订阅 管理

  public class ZongHe {
    public static void main(String[] args) {

        //调用function;

          function();

  }

   //int length();返回的是字符串长度
        public static void function(){
            String Str="skeji";  //定义字符串
            int  l=Str.length();  //计算字符串的长度赋值
            System.out.println(l);  //打印
    }
    
}

posted on 2019-03-18 21:49  米字键  阅读(1299)  评论(0编辑  收藏  举报