class StringClass {
	public static void main(String args[]) {
        String s0;  // Stringクラスの変数の宣言
        s0 = new String();  // コンストラクタ
		String s1 = new String("String Constructor"); // コンストラクタ
		
		System.out.println("s0 = " + s0 );
		System.out.println("s1 = " + s1 );
		
		int i = s1.length();
		System.out.println("Number of characters = " + i ); // 文字数
		char c = s1.charAt( 2 );
		System.out.println("Character at 2nd position = " + c );
		String s2 = new String("String Constructor");
		boolean b = s2.equals(s1);
		System.out.println("Is s2 equal to s1 ? " + b );
		
		// Staticメソッド
		i = 15;
		String s3 = new String( String.valueOf(i) );
		System.out.println( i + " is " + s3 );
		
	}
}
