Specifications
Sun Services
Java™ Programming Language
Module 3, slide 22 of 37
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Memory Allocation and Layout
• A declaration allocates storage only for a reference:
MyDate my_birth = new MyDate(22, 7, 1964);
• Use the new operator to allocate space for MyDate:
MyDate my_birth = new MyDate(22, 7, 1964);
my_birth
????
my_birth
????
day
month
year
0
0
0










