I'm reading an Objective-C book and I have a question that the book doesn't seem to really answer.

Let's say I have two custom-made classes. 

The first class is called `ClassA`. It has both the .h and .m files of course. The second class is called `ClassB`. It also has both .h and .m files.

Somewhere in the code, 'ClassA' has this method:

```
-(IBAction)displaySomeText:(id)sender {
    ClassB *myNumber = [[ClassB  alloc]init];

    NSString *numberString = [myNumber storedNumberAsString];
    // storedNumberAsString is just a method that returns a string object that holds
    // myVariable.

    [textView insertText:numberString];
    //textView is a object  I created that just displays some text on screen.

    [myNumber release];
}

```

The book tells me that `ClassB` should have a method:

```
-(id)init {
    [super init]; //I know why this is done, the book explains it well.
    myVariable = 42; // I created this variable already in the ClassB .h file 
    return self;
}

```

Now, when in the Interface Builder I click the buttons I connected, etc. It works, the number displayed is `42`.

My question is, why do I have to create an `-(id)init` method for `ClassB`, if I can do the following in `ClassA`'s method:

```
-(IBAction)displaySomeText:(id)sender {
    ClassB *myNumber = [[ClassB alloc]init];
    myNumber.myVariable = 42; //I just do this to skip the -(id)init method.

    NSString *numberString = [myNumber storedNumberAsString];
    [textView insertText:numberString];
    [myNumber release]; 
}

```

Doing this, it still displays the same value: `42`. I can change it to whatever I like. So why not just use the `init` inherited from `NSObject` and just do the simple way `myNumber.myVariable = 42`?