The FOUR access modifiers in Java

Pubblicato il: 20 agosto 2024
sul canale di: void theCoder
19
0

An access modifier is a keyword that defines the visibility of a class, method or field inside a class different from itself... See? I don't need Google for definitions.
There are four access modifiers(keywords) namely "public", "protected", "" and "private". Each one of these has a different social tolerance:
public is the happy pappy extrovert.
protected is only extroverted to "her" friend package and followers.
default is not a fan of opening up to people outside "her" friend package.
private's only relations are within "her", mysterious and absurdly antisocial.

NOTE: All four of these are true to themselves and hold nothing back. The can'ts mentioned in here are only for direct access, you can still use private methods or fields inside public methods within the class to access them from outside.

Timestamps
00:00 Explanation and example
01:35 Method creation
02:33 Class and package setup
03:16 public access modifier
04:17 protected access modifier
05:29 default access modifier
05:47 private access modifier
06:40 Conclusion
07:17 Outro

BGM
Rude
   • [FREE] DRAKE x ASAKE x AFROBEAT TYPE BEAT ...  

Omerta
   • GUNNA TYPE BEAT X FUTURE TYPE BEAT - OMERT...  

Nerves
   • (Free) Future Type Beat - Nerves | Travis ...  

#java #javaprogramming #coding #intellij #accessmodifier


In questa pagina del sito puoi guardare il video online The FOUR access modifiers in Java della durata di ore minuti seconda in buona qualità , che l'utente ha caricato void theCoder 20 agosto 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 19 volte e gli è piaciuto 0 spettatori. Buona visione!