Skip to content
Advertisement

Tag: type-conversion

Dealing with an ArrayStoreException

throws while doesn’t. Is there any other way to deal with that exception without creating a temporary String[] array? Answer In Java an array is also an object. You can put an object of a subtype into a variable of a supertype. For example you can put a String object into an Object variable. Unfortunately, the array definition in Java

Advertisement