9 Immutable vs Mutable Objects.docx - Mutable-vs-Immutable types Reference\/Shallow\/Deep Copies of Arrays Practice Problems 10 1 Write a main method

9 Immutable vs Mutable Objects.docx - Mutable-vs-Immutable...

This preview shows page 1 - 2 out of 4 pages.

10 Mutable-vs-Immutable types, Reference/Shallow/Deep Copies of Arrays Practice Problems 1.Write a main method which does the following and then consider the output and how this is a result of aliasing and how String is immutable and StringBuilder is mutable. It creates: - a String reference strOnethat refers to a String that contains "Hello"- a String reference strTwo ; ; ); ; ;
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read all 4 pages?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture