Java Tutorial - 26 | Access Modifiers in Java | Access Modifiers in Methods and Variables | Sinhala

preview_player
Показать описание
Java Tutorial - 26 | Access Modifiers in Java | Access Modifiers in Methods and Variables | Sinhala
Default:
Default access modifier means we do not explicitly declare an access modifier for a class, field, method
Private:
Methods, variables, and constructors that are declared private can only be accessed within the declared class itself
Public:
A class, method, constructor, interface. the declared public can be accessed from any other class. Therefore, fields, methods, blocks declared inside a public class can be accessed from any class belonging to the Java Universe.
Protected:
Variables, methods, and constructors, which are declared protected in a superclass can be accessed only by the subclasses in other package or any class within the package of the protected members' class

▬▬▬▬▬▬ Want to learn more? 🚀 ▬▬▬▬▬▬

▬▬▬▬▬▬ Connect with me 👋 ▬▬▬▬▬▬

#programming
#sinhala
#codeprolk
Рекомендации по теме
Комментарии
Автор

වීව්ස් බලාපොරොත්තු නැතුව උබ කරන වැඩෙ පට්ට ආ.😍😍

lahiruchathuranga
Автор

Thank you so much brother !! . godak watina video ekak👌👌

trojaneyestudio
Автор

Excellent.This is very clearly understand.

futuristictech
Автор

Aiye sub class ekak super class ekakin inherit karanakota. Super class eke data private karoth. Sub class ekedi e data access karanna ba neda.

thushankalana
Автор

cording ekkama explane karana nisa hodatama therenawa

duneekajayathilalke
Автор

kamal nimal classes dekema main methods hadana eke mokadda theruma

vitz