1

I found this piece of code:

public static class SinTransform implements ITransform{
    public double transform(double value){
        return sin(value);
        };
}

and I would like to know what ; after } means? When I need to wrote it?

justcurious
  • 839
  • 3
  • 12
  • 29
user5507755
  • 251
  • 1
  • 9

1 Answers1

5

It means empty statement which is terminated by ;, it says there is nothing but still empty to compute. Following is a valid java class.

public class Main {

    public static void main(String[] args) {
        ;
        ;
        ;
        ;
    }

}
akash
  • 22,664
  • 11
  • 59
  • 87