Just to addup on the Field solution (the setAccessible) so that you can access private variable of an object:
public static void dd(Object obj) throws IllegalArgumentException, IllegalAccessException {
Field[] fields = obj.getClass().getDeclaredFields();
for (int i=0; i<fields.length; i++)
{
fields[i].setAccessible(true);
System.out.println(fields[i].getName() + " - " + fields[i].get(obj));
}
}