RotazioneTesto.java
Created with JBuilder
import javabook.*;

class RotazioneTesto {

    public static void main(String[] args) {
        MainWindow mw = new MainWindow();
        mw.show();
        InputBox ib = new InputBox(mw);
        OutputBox ob = new OutputBox(mw);

        // Chiedo il testo all'utente
        String t = ib.getString("Testo? ");
        int N = ib.getInteger("N? ");

        // Ottengo la prima parte e la seconda parte
        String prima = t.substring(t.length()-N,t.length());
        String seconda = t.substring(0,t.length()-N);

        ob.printLine(prima + seconda);
        ob.show();

    }
}


RotazioneTesto.java
Created with JBuilder