「Java」charAt()で文字列を取得するサンプル
書式
public char charAt(int index)
サンプルコード
public class Demo {
public static void main(String[] args) {
String cft= "this is a test data";
System.out.println(cft.charAt(2));
}
}
Coding Changes the World
書式
public char charAt(int index)
サンプルコード
public class Demo {
public static void main(String[] args) {
String cft= "this is a test data";
System.out.println(cft.charAt(2));
}
}