Note that there is no error for division by zero. Divizion by zero leads to positive infinity while division by negative zero leads to negative infinity. Reference Data Types and Arrays The non-primitive data types in Java are objects and arrays. Arrays Arrays are also reference types. There are two ways to create an array in Java.
Arrays are similar to objects and assigning an array simply copies a reference to the array.
They are instances of the java.lang.String class. Java strings are treated more like primitive types than like objects. There is no way in which you can modify the content of a string. We have to use a StringBuffer object to be able to modify the content of a string. Each time the compiler finds a double quoted text, it automatically generates a string object for it.