A variable of type Object can store a reference to an object of any class type.
public class MainClass {
public static void main(String[] a) {
String saying = "A stitch in time saves nine.";
Object str = saying;
System.out.println(str);
System.out.println(str.getClass().getName());
}
}
A stitch in time saves nine.
java.lang.String