Guest User

Untitled

a guest
Sep 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. public class C1_A {
  2. static int [] a = {4,3,2,9};
  3. public int mt_A(int b) {
  4. int[] a = {31,30,29};
  5. return(a[b]);
  6. }
  7. }
  8.  
  9. public class C1_O {
  10. public static void main (String args[]){
  11. int a=2;
  12. int b=2;
  13. int c=a;
  14. int d;
  15. C1_A f = new C1_A();
  16. a = C1_A.a[b];
  17. System.out.println(a); //Output 1
  18. System.out.println(c); //Output 2
  19. System.out.println(f.mt_A(a)); //Output 3
  20. C1_A.a[c+1]= 2;
  21. d=C1_A.a[c-1];
  22. System.out.println(f.mt_A(d)); //Output 4
  23. System.out.println(f.mt_A(C1_A.a[3])); //Output 5
  24. }
  25. }
Add Comment
Please, Sign In to add comment