Javaで文字列
リテラル
シングルクオートはchar、ダブルクオートはstring。
code:char.java
char c = 'a';
String s = "str";
String t = 'this is errror';
文字列結合する3つの方法
StringBuffer クラスを使う
リテラルを + 演算子で結合する
String クラスの concat メソッドを使う
フォーマットする2つの方法
System.out.printf を使って %i とかする
MessageFormat クラスを使う。書式は My name is {0}. Nice to meet you, {1}!