Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

wat is the differences?

bengesbenges Member Posts: 331
why do we use [b][i]protected .. [/i][/b]?
and wat is the different of it if compare to the normal declare variable? thank a lot, guy

Comments

  • BreadfanBreadfan Member Posts: 22
    : why do we use [b][i]protected .. [/i][/b]?
    : and wat is the different of it if compare to the normal declare variable? thank a lot, guy
    :

    I may be wrong, but I think you can access a protected variable if:

    1. You are extending your current class (where you are trying to access that variable) from the class which holds the variable.

    2. Your current class is in the same package where the class holding that variable.

    If that's not right someone should correct me.

Sign In or Register to comment.