Home  >  Q&A  >  body text

Questions about object references in Java

1. Are the references of all class objects only storing memory addresses?
2. Are all references to class objects of the same data type as the class object? String a = new String("b") Can a be regarded as a String type?
3. How is the memory address stored in the reference? Where is it stored?

Thanks

给我你的怀抱给我你的怀抱2702 days ago582

reply all(1)I'll reply

  • 某草草

    某草草2017-05-27 17:42:20

    Recommend you to read this book https://book.douban.com/subje...

    reply
    0
  • Cancelreply