1 / 13

Heap

Stack. Heap. str. bira. String @42e816. anotherStr. String @42e816. bi. bi. String @3ecfff. ra. ra. String @ 9ae764. thirdString. bira. String @ 7cdaf2. Stack. Heap. hello. Hello. string @ a8fe24. same. string @ a8fe24. Stack. Heap. str1. Hello. String @ 6e278a. str2.

kenyon-bray
Download Presentation

Heap

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Stack Heap str bira String@42e816 anotherStr String@42e816 bi bi String@3ecfff ra ra String@9ae764 thirdString bira String@7cdaf2

  2. Stack Heap hello Hello string@a8fe24 same string@a8fe24

  3. Stack Heap str1 Hello String@6e278a str2 String@6e278a

  4. Stack Heap hel Hel string@6e278a hello Hello string@2fa8fc copy Hello string@a7b46e

  5. Stack Heap declared Intern pool string@6e278a interned string@6e278a built Intern pool string@a7b46e

  6. Stack Heap str1 Hello String@6e278a str2 Hello String@821a48

  7. Stack Heap str 0 1 2 3 4 5 6 7 8 910 11 12 13 14 15 16 17 18 20 21 string@821a48

  8. Stack Heap someCat (Cat members) Cat@6e278a

  9. Stack Heap name: String@a272e8 someCat Cat@6e278a color: String@852fa4 Johny brown

  10. Stack Heap name: String@a272e8 someCat Cat@6e278a color: String@852fa4 Johny brown

  11. Stack Heap i 42 (4 bytes) ch A (2 bytes) result true (1 byte) obj Integer (4 bytes) 42 Integer@9ae764 str Hello String String@7cdaf2 bytes 1 2 3 [B@190d11 byte[]

  12. Stack Heap i 0 (4 bytes) ch B (2 bytes) result Bye false (1 byte) String obj Integer (4 bytes) 42 null str Hello String String@9a787b bytes 1 0 3 [B@190d11 byte[]

  13. Capacity • StringBuilder: • Length=9 • Capacity=15 неизползван буфер използван буфер (Length)

More Related