Skip to content

Commit 2e93995

Browse files
committed
Static Block Addition
1 parent d4da099 commit 2e93995

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

TecmaxPractise/bin/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/com/
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.tecmax.methodExamples;
2+
3+
public class Harish {
4+
5+
public static void main(String[] args) {
6+
int customPPl = 20 + Madhuri.getAllFriendsCount() + 50;
7+
System.out.println(customPPl);
8+
}
9+
10+
/** Information Comment -- Static Block Example **/
11+
static {
12+
System.out.println("Welcome to java and git.\nHope this is interesting");
13+
}
14+
15+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.tecmax.methodExamples;
2+
3+
public class Madhuri {
4+
public static void main(String[] args) {
5+
Madhuri madhuri = new Madhuri();
6+
madhuri.getFriendsList("Nandini");
7+
int count =getAllFriendsCount();
8+
System.out.println(count);
9+
}
10+
11+
public static int getAllFriendsCount() {
12+
return 10;
13+
}
14+
15+
private void getFriendsList(String string) {
16+
System.out.println(string +" is Madhuri Friend");
17+
}
18+
}

0 commit comments

Comments
 (0)