can someone help me and tell me what is wrong, I can't figure it out. It is pointing to the line "public class Lab4.24"

import java.util.Scanner;

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

  int i; float sum;
  sum=sum + ( (i-2)/i);
  printf(" sum %f\n", sum);

You can't have a dot (.) in your class name. Remove it or use underscore (_) instead.

You can't have a . in a name. Lab4.24 is not a valid name in Java. You could use Lab4_24 if you wanted.

(And with respect to the next error message, remember 'System.out.' ;) )