thank you for you reply. i have fingerout my problem. i used ++(chr[i-1]), then ,when programs runs, chr0-> chr1, and it changged itslef also.
Type: Posts; User: Billzhang
thank you for you reply. i have fingerout my problem. i used ++(chr[i-1]), then ,when programs runs, chr0-> chr1, and it changged itslef also.
i am amateur. i try to use if statement, but i can't.
Soooo nice if any one could help.
ok, i have a type mistake, should be
int i
and i assign as 1 in for loop.
char[]chr=new char[21];
int i=0; chr[0]='A';
for(i=1; i<20 && chr[i]!='I' && chr[i]!='O' && chr[i]!='J';i++){
chr[i]=++(chr[i-1]);}
System.out.println(Arrays.toString(chr));
I want to...