Corrected capitalization, corrected to American spellings and typos (#30685)
* Translate challenge subtitles and example challenge text to Spanish * Corrected errors in syntax and punctuation * Multiple corrections of it/s to its plus other grammar corrections * Correction and added paragraph to CSS Flex article * Corrected my own typo * Corrected capitalization, American spellings and typos
This commit is contained in:
@ -17,7 +17,7 @@ These access modifiers can be applied to fields, methods and classes (Classes ar
|
||||
#### Private Access Modifier
|
||||
Allows a variable or method to only be accessed in the class in which it was created. No other class beyond the class that created the variable or method can access it. This is closely similar to your internal organs. They are only accessible to the owner. To make a variable or method private, you simply append the `private` keyword before the variable or method type, like `private int age`.
|
||||
|
||||
Let us use `private` in a coding example. If a bank wants to provide an interest rate of 10% on it's loans, it would make sure that the interest rate variable would stay private so as no other class would try to access it and change it.
|
||||
Let us use `private` in a coding example. If a bank wants to provide an interest rate of 10% on its loans, it would make sure that the interest rate variable would stay private so as no other class would try to access it and change it.
|
||||
For example:
|
||||
|
||||
```java
|
||||
|
Reference in New Issue
Block a user