Skip to content

Commit

Permalink
access specifier demo: package1 parent class
Browse files Browse the repository at this point in the history
  • Loading branch information
NirmalSilwal committed Sep 4, 2020
1 parent 310cccf commit cdd197b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions CodingBlocks Training/Day16/package1/Parent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package Lecture16.package1;

public class Parent {

public int d1 = 10; // public access specifier
protected int d2 = 20; // protected access specifier
int d3 = 30; // default access specifier
private int d4 = 40; // private access specifier

public void fun() {
System.out.println("inside package1 fun");
}
}

0 comments on commit cdd197b

Please sign in to comment.