Jaya,
Welcome to CodeRanch! I've added [ code ] tags to make your post easier to read.
When you call A.add(a), you are saying to call a method defined on the class. That's what a static method is.
If you wanted to use an instance method (one without the
word static), you'd need to create an instance of the object:
You might not have learned about instantiating an object yet, but it is coming.