猿问

凯撒加密,用队列为什么输出的是一串数字求问

public class Codes {
 public static void main(String[] args){
 int [] key={5,12,-3,8,-9,4,10};
 Integer keyvalue;
 String encoded=null,decoded=null;
 String message="dasdasdasdasdasdafdf";
 Queue<Integer> encodingQueue=new LinkedList<Integer>();
 Queue<Integer> decodingQueue=new LinkedList<Integer>();
 
 
 for(int i=0;i<key.length;i++){
  encodingQueue.add(key[i]);
  
 }
 for(int j=0;j<message.length();j++){
  keyvalue=encodingQueue.remove();
  encoded+=(char)message.charAt(j)+keyvalue;
  encodingQueue.add(keyvalue);
 }
 System.out.println(encoded);

慕先生1568897
浏览 1049回答 0
0回答

慕设计2395807

LBWMWSUKTWFDTPYIKAPFILHXTWLODZJZVJYHDTPKHKSPLUWMWFUDTPFJFNKFVETWFILOJTVEAJMVRVXFISHDTCYVFUJMPRADMPEVKAWSBKTWGPMOWZVRHDMWSDQTJYVDGCYVSNDTPSUJMDMZIEAVYNWLIELUJTVLACZVTIKTPLHXTCYMKMHXLIRGPZVKAVLUQFBRHDFUDAPYAQTCZCETWSHWGWTPLAPSHKFUXHPSBKMBRUJFQZFHDFVLNQMVSBXMPEOQZODTSBBEHQMCLBRMCYAQGVEBLBKHWMBRSOSOMWMBDZIRAQAQWKZPRODAWFBBQMIEOWFPGWETPSUKZPSIEIKTVLHKMAXHAVRUKLAQZJLSHWTOROWMWMQFVEUWLUJSPDMIFUKZPFOQMWLHDMCYIKNFMVKNDYIXIRQMIFOKZCSOLZOXNJMILHQZRMPRBXMHQZWXZBJYUWSCSBRAJXMPYHDADNCYBQAIFBLHAJLHQGIRBKGWFBXTBKMWFVFHDZADFORHRIKZUDAWSCFHDZBXUXFCSORGCYAWTCEHENBQZCLHWSVYAPSUKSCLHXTVXZWRUWZVRVRCKMPSBXAPFVDMORFBXTQMVIYGOYGJLOEIOJYOSURNCFBMCRUWZIENRHBKTJFBRGWMONJYIRNJYBKTCRADFVLSOLUZOYHIRNWSVYNJLHEGJLNJMSBQZPKGPYBXXGP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