jasonsmith nath wrote:I have written a class named School with few attributes and 2 simple methods. This java file compiled successfully.
And what package is it in? If you put it in the School package then you shouldn't have to import it into SchoolApp, so it appears you didn't put it there. If you didn't put it into any package then you won't be able to import it into SchoolApp, so if that's what you did then you're going to have to put it into some package.
To me it seems like it ought to be in the School package too, so why don't you try putting it there? No import would be necessary then.
Also... it's standard for package names to start with lower-case letters, e.g. "school". Right now your "School" package can be confused with your "School" class by people reading your code.