aspose file tools*
The moose likes Beginning Java and the fly likes what does  char name[] = new char[ 15 ], temp;    do Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what does  char name[] = new char[ 15 ], temp;    do " Watch "what does  char name[] = new char[ 15 ], temp;    do " New topic
Author

what does char name[] = new char[ 15 ], temp; do

lupercal hill
Greenhorn

Joined: Sep 28, 2005
Posts: 9
char name[] = new char[ 15 ], temp;

Is temp an array of chars similar to name. I'm not quite sure. I understand the rest of the code. Which please me Thank you for your help.



Seb Mathe
Ranch Hand

Joined: Sep 28, 2005
Posts: 225
No, temp is here just a char...

It's a bad idea to declare more than one variable on one line, especially when some off the varaibles are arrays...

char[] name, temp;

would have defined 2 arrays.


Regards,<br />Seb<br /> <br />SCJP 1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what does char name[] = new char[ 15 ], temp; do