- package qbb;
- class Person{
-
- }
- public class Test{
- public static void main(String[] args){
- System.out.println(new Person().toString());
- }
- }
复制代码 运行结果:
qbb.Person@1f66cff- package qbb;
- class Person{
-
- }
- public class Test{
- public static void main(String[] args){
- System.out.println(new Person());
- }
- }
复制代码 运行结果:
qbb.Person@1f66cff
现在有两个问题:
1.为什么结果一样呢?
2.结果中@1f66cff具体代表什么呢?
|