text: Q:
  
  Java program compiling error
  
  i dont know what im doing wrong but the compiler keeps saying:
  
  StringLength.java:3: error: class problem is public, should be declared in a file named problem.java public class problem
  
  here is the code:
  import java.util.Scanner;
  
  public class problem {
      public static void main(String[] args) {
      Scanner input = new Scanner(System.in);
      System.out.println("Enter a string");
      String s = input.nextLine();
  
      String lower = "";
      String total = "";
  
      for (int i = 0; i < s.length(); i++) {
          char thisChar = s.charAt(i);
  
          if (thisChar >= 97 && thisChar <= 122) {
              lower += thisChar;
          }
      }
  
      System.out.println("Total amount of characters: " + s.length() + " - " + s);
      System.out.println("Lower case letters: " + lower.length() + " - " + lower);
      }
  }
  
  can someone help me please?
  
  A:
  
  Your file is named StringLength.java but your class is named problem on Line 3. Your class name should have the same name as your file name, without the .java extension, i.e. StringLength.
  
  