I have a based class within my Java application. I would like to add new classes on the fly based on my based class. Is there any way to do it while running the application.

For example in my program, I have

class BasedClass {
private String name;
BasedClass(String name){ this.name = name;}


Thanks for any opinion to achieve this.