add number to a character to make it another character
问题 I want to have a char, add number to it and get another char(a+2=c) int leng,leng2; String word = ""; String key = ""; String enc =""; char x; char z; char tost; System.out.println("gimme word"); word=in.next(); System.out.println("gimme key"); key=in.next(); leng=word.length(); leng2=key.length(); for(int i=1;i<=leng;i++) { z=word.charAt(i-1); x=key.charAt(i-1); int plus=z + x; tost=(char)plus; enc=enc+tost; System.out.println(enc); System.out.println(tost); System.out.println((char)z);