This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
lupercal hill
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!