Source |
CodingSec |
Identifiant |
94042 |
Date de publication |
2016-09-19 16:00:54 (vue: 2016-09-19 16:00:54) |
Titre |
What is static keyword in java |
Texte |
In this article we will look at static keyword which can be used to share data among multiple objects. static Keyword In Java programs, static keyword can be used to create the following: Class variables Class methods Static blocks Class Variables: The static keyword is used to create one of the three types of variables called as class variables. A class variable is a variable declared inside a class and outside all the methods and is marked as static. Syntax for declaring a class variable or a static variable is shown below: static data-type variable-name; Example for declaring a class
|
Envoyé |
Oui |
Condensat |
all among appeared article atâ staticâ keyword below: blocks called can class coding create data declared declaring example first following: inside java keyword look marked methods multiple name; objects one outside post programs security share shown static syntax three type types used variable variables variables: what which will |
Tags |
|
Stories |
|
Notes |
|
Move |
|