I got this code:
import java.util.*;
import java.io.*;
public class Oblig3A{
public static void main(String[]args){
OrdAnalyse O = new OrdAnalyse();
This is not an error... This is what the default toString() implementation of the Object class returns...
[Ljava.lang.String;@163de20
Means:
[L
)java.lang.String
)Code of Object.toString()
public String toString() {
return getClass().getName() + "@" + Integer.toHexString(hashCode());
}
What you shouldd do is to use a proper way to print:
a loop
StringBuilder sb = new StringBuilder();
for(String s: myArray) {
sb.append(s);
if(sb.length()>0) {
sb.append(',');
}
}
System.println(s.toString());
Arrays.toString