String x;int x;User user;此种均为声明,声明引用或变量,只开辟了栈内存;String x=new String("aaa");User user=new User();开辟了堆内存进行存储