morry2341

plenumKlassA

Dec 12th, 2022
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. public class A {
  2. private int a;
  3.  
  4. public A (int a){
  5. this.a = a;
  6. }
  7.  
  8. public int getA(){
  9. return this.a ;
  10. }
  11.  
  12. public int add(A a){
  13. return this.a + a.getA();
  14. }
  15.  
  16. public int m(){
  17. return 1;
  18. }
  19.  
  20. public int n(){
  21. return this.m();
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment