What is Static Member?

Posted by Unknown Rabu, 29 Januari 2014 0 komentar
Static member is a member that belongs to the class and not to the objects of the class. Static members are specified using the keyword static. The three valid static members of a class are static constructor, static variable and static method.

Static Variables:
When a variable or attribute of a class is declared as static then it is called as Static Variable. Only one copy of static variable will be stored in the memory. All the objects of the class will be accessing the same copy of it.

Static Methods:
Static methods are the methods which are marked as static. Static method can access only static members of a class. Static methods cannot access non-static or instance members of a class.

Static Constructors:
Static constructors are special type of constructors that are called when the class is loaded for the first time. Static constructors are used to initialize static variables of a class.
TERIMA KASIH ATAS KUNJUNGAN SAUDARA
Judul: What is Static Member?
Ditulis oleh Unknown
Rating Blog 5 dari 5
Semoga artikel ini bermanfaat bagi saudara. Jika ingin mengutip, baik itu sebagian atau keseluruhan dari isi artikel ini harap menyertakan link dofollow ke http://androidpopuler.blogspot.com/2014/01/what-is-static-member.html. Terima kasih sudah singgah membaca artikel ini.

0 komentar:

Posting Komentar

Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android populer.