Array Variable assignment example code
//Array Variable assignment example code
package arrays;
public class ArrayVariableAssign {
public static void main(String[] args) {
int [] a={10,20,30};
char [] ch={'j','a','v','a'};
// int [] b=ch; ( in variable level implicit promotion is allow not in array level
int [] c={10,20,30,40};
int [] b={50,60,70};
c=b;
b=c; // here we have to consider only types irrespective of sizes.
}
}
0 comments:
Post a Comment