4 Replies Latest reply on Sep 16, 2009 1:15 AM by 807580

    Creating and Manipulating Strings Question


      import java.util.*;

      class String {
      public static void main(String[] args) {

      String s;
      s="This Is A Sample String";
      System.out.println(s.substring(9) + s.substring(0,8));


      For some reason, there was a problem with line

      s="This Is A Sample String";

      It didn't work because of incopatible types.

      Also both s.subtring lines had an error at the dot because of cannot find symbol.

      I didn't see aything wrong with the program, but was there something else that should've been imported? Thanks.