1620_lecture_13 - ITEC3620 Object-Based Programming Lecture...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
ITEC3620 Object-Based Programming Lecture 13 References
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
A Simple Class AnInt objectA = new AnInt(); AnInt objectB = new AnInt(); objectA objectB value AnInt value AnInt
Background image of page 2
Value Assignments objectA.value = 5; objectB.value = 7; objectA.value =objectB.value; objectB.value = 10; System.out.println(objectA.value); System.out.println(objectB.value);
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Value Assignments II objectA =objectB; objectB.value = 12; System.out.println(objectA.value); System.out.println(objectB.value); How is objectA.value affected?
Background image of page 4
Value Assignments III Assignment copies a value from one memory location to another What are the memory locations, and what do they hold? Note the difference between copying values and copying references
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Value Assignments IV AnInt objectA = new AnInt(); AnInt objectB = new AnInt(); objectA objectB value AnInt value AnInt
Background image of page 6
Value Assignments V objectA.value = 5; objectB.value = 7; objectA objectB 5 value AnInt 7 value AnInt
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Value Assignments VI objectA.value =objectB.value; objectB.value = 10; objectA objectB 7 value AnInt 10 value AnInt
Background image of page 8
Value Assignments VII objectA =objectB; objectB.value = 12; objectA objectB 7 value AnInt 12 value AnInt
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/06/2010 for the course INFORMATIO ITEC 1620 taught by Professor Stephenchen during the Winter '10 term at York University.

Page1 / 32

1620_lecture_13 - ITEC3620 Object-Based Programming Lecture...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online