Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ScopePractice {//class scope starts here
- private int num;
- private String str;
- public ScopePractice(int n, String s) {
- int n1=5;
- num = n;
- str = s;
- }
- public int getNum() {
- return num;
- }
- public void setNum(int n) {
- num = n;
- }
- public String getStr() {
- return str;
- }
- public void setStr(String s) {
- str = s;
- }
- }//class scope ends here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement