Hi Hema,
class A cannot be found, because you called the file a.java with a lowercase a. Save it as
A.java
With the default access modifier (that is: no modifier written at all) all classes and fields (variables and methods) are visible in the entire package.
Ali Gohar posted November 02, 2006 12:01 AM
If class A is in another java file then you need to import class A before using it.
This is wrong.
Imports are never ever required!
When a class is in a different package (not file, as Ali wrote), you have to adress it with package and class identifier like for example
importing only saves typing action. When you have an import statement like
import java.awt.Point; or
And: if a class or field is not visible from the package where you want to adress it, you also cannot import it.
Yours,
Bu.