Skip to content

Commit 3729a9a

Browse files
Update own java documentation by me
1 parent 93927d8 commit 3729a9a

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

Diff for: own java documentation by me

+27-1
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,37 @@ final strictfp public static void main(String[] args)
180180

181181
-------------------------------------------------------------------------------------------------------------------------------------
182182

183+
Java variables
183184

185+
There are three types of variables
186+
1.local variables.
187+
2.instance variables
188+
3. Static variables.
189+
190+
1.LOCAL Variables.
191+
declare inside a method.
192+
193+
194+
2.INSTANCE Variables
195+
menas that we can declare inside class but outside of the method.
196+
197+
3.STATIC Variable.
198+
variable that can be declared as static .it can not be local variavle
184199

185200

201+
example for the variable declarations.
202+
class A{
203+
int data=50;//instance variable
204+
static int m=100;//static variable
205+
void method()
206+
{
207+
int n=90;//local variable
208+
209+
}
210+
}//end of class
186211

187212

188213

189214

190-
215+
--------------------------------------------------------------------------------------------------------------------------
216+

0 commit comments

Comments
 (0)