class Person { private String name; } public class Main { public static void main(String[] args) throws NoSuchFieldException { Class cls = Person.class; Field nameField = cls.getDeclaredField("name"); System.out.println(nameField); } }In this example, we have used the getDeclaredField() method to get the field object for the "name" field of the Person class. We have then printed out the field object to the console. The package library for this method is part of the standard Java library, so it is available in the java.lang.reflect package.