ॐ सर्वे जना: सुखिनो भवन्तु , तथास्तु |
'May the whole world be happy, so be it'
SCJP1.5, SCWCD1.5
Originally posted by Satou kurinosuke:
firstName.length() ?
ॐ सर्वे जना: सुखिनो भवन्तु , तथास्तु |
'May the whole world be happy, so be it'
SCJP1.5, SCWCD1.5
"Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration."- Stan Kelly-Bootle
Always say the TRUTH only
ॐ सर्वे जना: सुखिनो भवन्तु , तथास्तु |
'May the whole world be happy, so be it'
SCJP1.5, SCWCD1.5
Originally posted by Bharat Makwana:
If I asked you to determine length of firstName without using any String class methods,how will you proceed ??
I hope you got my question ?
Originally posted by Devesh H Rao:
store it in a char[] and the length of the array is the length which you need.
Note: String class stores the characters in a char [] as well.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
ॐ सर्वे जना: सुखिनो भवन्तु , तथास्तु |
'May the whole world be happy, so be it'
SCJP1.5, SCWCD1.5
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Consider Paul's rocket mass heater. |