Java Class Members | A2IT ONLINE | JAVA COURSE смотреть онлайн
Java Class Members | A2IT ONLINE | JAVA COURSE
Every single thing which are in the scope of the class is called class members, not only in java but this can also be applied in other programming languages.
For example, if objects and methods are in the scope of class 'A', they are the class members of class 'A'.
There are FIVE members in a class.
Member Variables (States)
Methods (Behaviors)
Constructor
Blocks (Instance/Static Blocks )
Inner Classes.
Find a example :
public class Human{
private String name;
public static int count;
public Human(String name) {
this.name = name;
}
public void dream (){
System.out.println(name + " is dreaming to learn JAVA :)");
}
{
System.out.println("Human got initialized");
}
static{
System.out.println("Human class has loaded to memory");
}
private class inner{
public void getHumanName(){
System.out.println(name);
}
}
public static void main(String[] args){
Human h = new Human("Superman");
h.dream();
System.out.println(Human.count);
}
}
The components of a class, such as its instance variables or methods are called the members of a class or class members. A class member is declared with an access modifier to specify how it is accessed by the other classes in Java. A Java class member can take any of the access modifiers, such as - public, protected, default and private.
Public access modifier
A class member, be it an instance variable or a method, can be declared with the public keyword. A class member declared with a public access modifier is accessible and visible to all the classes, as long as its class is visible to other classes.
Private access modifier
A class member - instance variable or method declared with the private keyword will be hidden and inaccessible to the other classes and it won't serve any purpose. Private member of a class is only accessible in the class in which it is declared or defined and not outside it
Default access modifier
When you declare a class member with no access modifier, it is automatically given a default access modifier or default visibility, which means that this class member is accessible and visible only to the classes in the same package.
Protected access modifier
A Java class member such as - instance variable or method declared with the protected keyword will be accessible and visible to -
All the classes in the same package.
All the sub classes in the different packages
Now Get Free Video Courses, E-Books, Event Updates & Class Notes Anywhere Anytime
LEARN ANYWHERE WITH A2IT IOS AND ANDROID APP
https://a2itsoft.com/free-app
Free Download Educational App with Step-by-Step Guide To Learn or Teach in Smarter Way
our Websites:
https://www.a2itonline.com
https://www.facebook.com/A2itonline
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Java Class Members | A2IT ONLINE | JAVA COURSE» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.