Search Engine Optimization
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Affiliates
Static Variable in Java Image-6549946-10459049
Latest topics
» How do you insert images in HTML?
Static Variable in Java EmptyTue Feb 14, 2023 1:39 pm by Designpluz

» What tag is used to insert the main and largest heading in HTML?
Static Variable in Java EmptyTue Feb 14, 2023 1:39 pm by Designpluz

» Is any of the following software suitable for building websites?
Static Variable in Java EmptyTue Feb 14, 2023 1:38 pm by Designpluz

» Browsers apply the tag feature until they encounter a ___ tag.
Static Variable in Java EmptyTue Feb 14, 2023 1:38 pm by Designpluz

» Which language is helpful to create web pages?
Static Variable in Java EmptyTue Feb 14, 2023 1:38 pm by Designpluz

» Which is the most common language used in web designing?
Static Variable in Java EmptyTue Feb 14, 2023 1:37 pm by Designpluz

» Can comments be inserted into HTML code without being picked up by the browser?
Static Variable in Java EmptyTue Feb 14, 2023 1:37 pm by Designpluz

» What is the point of marking an element as an ARTICLE, MAIN, HEADER, or ASIDE?
Static Variable in Java EmptyTue Feb 14, 2023 1:36 pm by Designpluz

» Are there any ways to reduce the loading time for a page?
Static Variable in Java EmptyTue Feb 14, 2023 1:36 pm by Designpluz


Static Variable in Java

2 posters

Go down

Static Variable in Java Empty Static Variable in Java

Post by bangalorewebguru 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 : 1204
Earned : 4896
Credit : 4
Join date : 2013-10-15
Age : 31
Location : Bangalore

Back to top Go down

Static Variable in Java Empty Re: Static Variable in Java

Post by tyagi 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

Back to top Go down

Back to top


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