I come from a slightly java background as I learned it this year in my Computer Science program. I'm now learning objective-C. What confused me recently was the number object. Why do number objects not have to be initialized. Look below:
NSNumber *myFloat;
myFloat = [NSNumber numberWithDouble: 10.09];
When we write our own objects, they always have to be initialized as below;
someObject x = [[someObject alloc]init];
So why is it different here? Is it because the objects we build by default have that as the way to initialize them? Did number objects have their "way to initialize them" changed by the programmers that designed the number object?