Affiliates
Latest topics
» What are backlinks
Fri Feb 23, 2018 9:33 pm by komaljain0012

» What are LSI keywords
Fri Feb 23, 2018 9:29 pm by komaljain0012

» What is long tail keyword
Thu Feb 22, 2018 6:58 pm by kalmakuran

» What is Crawling
Thu Feb 22, 2018 6:46 pm by kalmakuran

» What is Page Title
Thu Feb 22, 2018 6:20 pm by nidhijain1221

» 10 Most Famous Historical Monuments of India...?
Thu Feb 22, 2018 2:28 pm by angilpari1122

» Is YouTube important for marketing?
Wed Feb 21, 2018 5:08 pm by Sankara Vignesh

» How important are keywords in content marketing?
Wed Feb 21, 2018 5:03 pm by Sankara Vignesh

» What are paid results
Wed Feb 21, 2018 4:57 pm by Sankara Vignesh


Static Variable in Java

Go down

Static Variable in Java

Post by bangalorewebguru on Fri Jul 31, 2015 2:46 pm

Class variables also known as static variables are declared with the static keyword in a class, but outside a method, constructor or a block.

bangalorewebguru
platinum
platinum

Posts : 1185
Earned : 4828
Credit : 4
Join date : 2013-10-15
Age : 24
Location : Bangalore

View user profile

Back to top Go down

Re: Static Variable in Java

Post by tyagi on Fri Mar 31, 2017 6:54 pm

1.It is a variable which belongs to the class and not to object(instance)
2.Static variables are initialized only once , at the start of the execution . ...
3.A single copy to be shared by all instances of the class.
4.A static variable can be accessed directly by the class name and doesn't need any object.

Thank you~!

tyagi
platinum
platinum

Posts : 156
Earned : 312
Credit : 0
Join date : 2017-01-23

View user profile

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum