We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 384d43f commit 10efa40Copy full SHA for 10efa40
src/VariableTypes.java
@@ -0,0 +1,15 @@
1
+class Test{
2
+ int number = 100;//Instance Variable
3
+ static int num = 50;//Class variable
4
+ void display(){
5
+ int sum;//Local Variable
6
+ sum = number + num;
7
+ System.out.println("Total Sum :"+sum);
8
+ }
9
+}
10
+public class VariableTypes {
11
+ public static void main(String[] args) {
12
+ Test test = new Test();//Object creation
13
+ test.display();//Method call
14
15
0 commit comments