Answers for "java get object from string name"

0

java get object from string name

try {
	ObjectType instance = getClass().getDeclaredField("name of var").get(ObjectType.class);
} catch (Exception e) {
	e.printStackTrace();
}
Posted by: Guest on October-26-2021

Code answers related to "java get object from string name"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language