What is the rule for local members in Java?

Rule for Local Variable Local variables cannot use any of the access level since their scope is only inside the method . Final is the Only Non Access Modifier that can be applied to a local variable. Local variables are not assigned a default value, hence they need to be initialized.

Sizin İçin Seçtik  Which of the following access modifier can be accessed within a class private protected public?

Leave a Reply

Your email address will not be published. Required fields are marked *