• Post Reply Bookmark Topic Watch Topic
  • New Topic

Char Array  RSS feed

 
srinivas sridaragaddi
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


output:
here nothing is printed.


please explain the output??

as i know that primitive arrays are given default value.

but even when the array declarations are made outside the main
method output remain the same "nothing is displayed".
 
Teo Framoe
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Try System.out.println("-"+y+"-");
Array element always get default values.
Default char is '\u0000', invisibel, but you can see it occupies
a character position between the two "-".
Regards,
Teo
[ October 15, 2007: Message edited by: Teo Framoe ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!