Loading...

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 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 [ … ]