File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
src/com/tecmax/methodExamples Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ /com /
Original file line number Diff line number Diff line change 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.\n Hope this is interesting" );
13+ }
14+
15+ }
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments