learning final class and method