?? caesar.java
字號(hào):
public class Caesar{
public static void main(String args[]) throws Exception{
String s=args[0];
int key=Integer.parseInt(args[1]);
String es="";
for(int i=0;i<s.length( );i++){
char c=s.charAt(i);
if(c>='a' && c<='z'){
c+=key%26;
if(c<'a') c+=26;
if(c>'z') c-=26;
}
else if(c>='A' && c<='Z'){
c+=key%26;
if(c<'A') c+=26;
if(c>'Z') c-=26;
}
es+=c;
}
System.out.println(es);
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -