This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: what does char name[] = new char[ 15 ], temp; do
 
It's not a secret anymore!