char[] word2; String word; word[j]=word2.charAt(i);-------
or this
--------
String word;
String word2;
char c;
for (int i=0;i<word.length();i++)if (c=word.charAt(i)=='P'){word2.concat(valueOf(c));j++;}
---------- Post added 01-07-2012 at 12:21 AM ---------- Previous post was 01-06-2012 at 11:13 PM ----------
Any way I found the solution for anyone who would make the same mistake, Here it is, it should be
char[] word = {};
String word2 = " ";
word[j]=word2.charAt(i);


Sign In
Create Account


Back to top









