Declaration and initialisation of array of strings in java

34 Views Asked by At

When we declare an String array in Java

String[] obj =new String[10];

When we print this it return null value by default

But I want to change this null to empty strings but without using loop

Can someone tell me how can I declare an array with value of empty string

You can use any ds to store strings like arraylist arrays etc but by default value should be empty string not null

Array size is variable and using different arrrays

0

There are 0 best solutions below