package com.day7.one;
public class StringDemo {
* @param args
* char charAt(int index);获取指定索引位置的字符
* char[] toCharArray():把字符串转成字符数组
//public static char[] c2;//成员变量只需定义就行,系统会默认初始化
public static char c3;//默认初始化为"/u0000"
public static int n;//默认初始化为0
public static void main(String[] args) {
System.out.println(c3);
System.out.println(n);//打印0
String str="abcde";
for (int i=0;i