In reply to janudeep3:
It is not that way.
Here in object constructor, You have provided “class_name” as a default argument for field called ‘name’ which has type ‘string’. So now, if you are not mentioning any string value during the object creation, then it will take “class_name” as a object name by default.
UVM is not restricting to create ‘component’ without default string name and ‘object’ with string name.