Skip to content

Commit a42265c

Browse files
Create static_method.java
1 parent 3000a78 commit a42265c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

class/static_method.java

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
class Box
2+
{
3+
static int a=9;
4+
static int b=90;
5+
6+
static void display()
7+
{
8+
System.out.println("the vlaue updated is a+b is:"+a+b);
9+
}
10+
11+
}
12+
13+
public class Main
14+
{
15+
public static void main(String[] args)
16+
{
17+
//int a=4;
18+
Box ob1=new Box();
19+
ob1.display();
20+
}
21+
}

0 commit comments

Comments
 (0)