fork download
  1. import java.util.Scanner;
  2. class Rotate {
  3.  
  4. /**
  5.   * @param args the command line arguments
  6.   */
  7. public static void main(String[] args) {
  8. // TODO code application logic here
  9. Scanner sc=new Scanner(System.in);
  10. String str="ABCDEFGH";
  11. //char rev;
  12. for(int i=0;i<=8;i++){
  13. for(int j=str.length()-1;j>=0;j--){
  14.  
  15. //rev=str.charAt(i);
  16. System.out.print(str.charAt(j));
  17. str=str.substring(1)+str.CharAt(0);
  18. }
  19. System.out.println("");
  20. }
  21. }
  22. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:17: error: cannot find symbol
            str=str.substring(1)+str.CharAt(0);
                                    ^
  symbol:   method CharAt(int)
  location: variable str of type String
1 error
stdout
Standard output is empty