All classes inherit the toString method:
String toString()
but...
1
2 public class ex2
3 {
4
5 public static void main(String[] args)
6 {
7 String str[] = new String[5];
8 str[0] = "one";
9 str[1] = "two";
10 str[2] = "three";
11 str[3] = "four";
12 str[4] = "five";
13
14 System.out.println(str);
15 }
16 }
Output:
Ljava.lang.String;@19821f