stringbufferexam.java

来自「JAVA 2应用开发指南」· Java 代码 · 共 15 行

JAVA
15
字号
// stringbufferExam.Java
public  class stringbufferExam
{
        public static void main(String args[])
   {
          StringBuffer sf1=new StringBuffer("This is the first string");
          StringBuffer sf2=new StringBuffer( );
          sf2.append("This is the second string");
          StringBuffer sf3=new StringBuffer(2);
          sf3.append("This is the third string");
          System.out.println("sf1="+sf1);
          System.out.println("sf2="+sf2);
          System.out.println("sf3="+sf3);
   }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?