title: moving the characters in a text string a specified number of positions
body: <p>I am new in programming and I am trying to write a program that moves the characters in a text string a specified number of positions.</p>
  
  <p>The program must include a method whose inputs will be a text string (type String) and the number of positions (type <code>int</code>). The output will be a string with characters shifted.</p>
  
  <p>For example, moving 4 positions:</p>
  
  <pre>
  <b>rabb</b>it eats a carrot
  it eats a carrot<b>rabb</b>
  </pre>
  
  <p>Now I have this partial code. I can erase first characters but I don't know how to put them to the end of this text. How can i make it?</p>
  
  <pre><code>public static void main(String[] args) {
      System.out.println("enter the text: ");
      Scanner cti = new Scanner(System.in);     
      String a = cti.nextLine();
      System.out.println("enter number of positions= ");
      int b = cti.nextInt();
      char firstLetter = a.charAt(0);
      b--;
      a = a.substring(b); 
      String m = a + firstLetter ;
      System.out.println("now it is "+ m);
  }
  </code></pre>