| | |
Char Array ib Java?
![]() |
Of course you can declare char arrays, but be aware that each "String" is a char array, so you would need a two dimensional array to hold char arrays equivalent to an array of Strings.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
That depends on what you mean by "manipulate".
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
•
•
•
•
I understan that. What I cann,t understand is showing throgh example. For Example I am going to store char's "A A A A A" in array. for some reasons I want to manipulate it later then how can I do that?
Thanks
Java Syntax (Toggle Plain Text)
char [] row = new char[5]; // is the same as any other array declaration for ( int i = 0; i < row.length; i++) row[i] = 'A'; // now you have your {'A','A'...} do notice that for chars, you don't use ", but ' // to manipulate the first char of the row (set the value to 'B') row[0] = 'B';
![]() |
Similar Threads
- Split string into char array (C)
- Need help linking java to c with multiple OS support. (Java)
- Java pass array value (Java)
- Simple array question (C++)
- Java to C++ (C++)
- Help BubbleSort Array wont run? (Java)
- Conver int Array into a String (Java)
- two-dimensional char array (Java)
- Need some help with a Java lab... (Java)
Other Threads in the Java Forum
- Previous Thread: reading txt doc
- Next Thread: Array
| Thread Tools | Search this Thread |
911 actionlistener addressbook android api append applet application array arrays automation binary blackberry block bluetooth character chat class client code component consumer csv database desktop developmenthelp eclipse error fractal ftp game givemetehcodez graphics gui html ide image integer j2me j2seprojects japplet java javaarraylist javac javaee javaprojects jni jpanel julia lego linked linux list loops mac map method methods mobile netbeans newbie number objects online oriented panel printf problem program programming project projects properties recursion replaydirector reporting researchinmotion rotatetext rsa scanner se server set singleton sms sort sql string swing test textfields threads time title tree tutorial-sample ubuntu update windows working






