Category: Java
Types Of Variables
Variables are divided into three types based on behavior and position of declaration. They are:1. Instance Variables2. Static Variables3. Local Variables Instance Variables: –> Instance variables are the variables which [ … ]
Array Variable Assignments
Element level promotions are not applicable at array object level.Example: A char value can be promoted to int type but char array cannot be promoted to int array.Example:int[] x={5, 10, [ … ]
Array Element Assignments
In primitive arrays as array elements is allowed which can be promoted to declare type.Example:For int arrays allowed array elements types are byte, short, char, int. int[] a=new int[10];a[0]=86;a[1]=’x’;byte b=10;a[2]=b;short [ … ]