Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Rani Singh   on Nov 06 In Java Category.

  
Question Answered By: Elisabeth Bell   on Nov 06

The value you got while printing a is not a junk. The part before the '@'
cahracter represents the class  to which 'a' belongs, since it is an integer you
get '[I' and the remaining part after '@' is the address of the array... you can
verify this, by creating an instance of a class and printing it... consider that
your object is 'ob' of class 'A' then you'll get the output of
System.out.println(ob) as A@(address of a)..

Share: