Get public and private fields Write a program that fetches the public and private fields of the given class via reflection.