Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class C1_A {
- static int [] a = {4,3,2,9};
- public int mt_A(int b) {
- int[] a = {31,30,29};
- return(a[b]);
- }
- }
- public class C1_O {
- public static void main (String args[]){
- int a=2;
- int b=2;
- int c=a;
- int d;
- C1_A f = new C1_A();
- a = C1_A.a[b];
- System.out.println(a); //Output 1
- System.out.println(c); //Output 2
- System.out.println(f.mt_A(a)); //Output 3
- C1_A.a[c+1]= 2;
- d=C1_A.a[c-1];
- System.out.println(f.mt_A(d)); //Output 4
- System.out.println(f.mt_A(C1_A.a[3])); //Output 5
- }
- }
Add Comment
Please, Sign In to add comment