Just to try to "flesh out" Adrabi's answer:
You created class
A
with a constructor that takes as input a single string.
Then, when you created your new A, you didn't pass anything in. I assume what you were supposed to pass in was from the argument list, correct?
You may have wanted:
public static void main(String[] args) {
for (String s: args)
{
A a = new A(s);
a.print();
}
}