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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
wood burning stoves
 
subject: what does char name[] = new char[ 15 ], temp; do
 
Similar Threads
Please explain this becuase I dont understand
Printing out Ascii charactors
Random Access Files
u_int8_t in java
Random Access Files