我正在使用Java 8.假设我有两个字符串a=helloworld和b=howareyou分别。我想从字符串a中找出字符串b的匹配字符及其在b中的位置。在我的示例中,匹配字符是h,e,o, w, r和r是字符串b中的第5个字符。我不想找到它是否是子字符串。我只想检查一个字符串的字符是否存在于另一个字符串中。有没有办法做到这一点?以下是我的Java代码。 public class CharCheck
char stringToAdd[4097] = "";
// some manipulations on stringToAdd to add some value to it.
if(stringToAdd[0] != '\0') {
response = MethodCalledHere("Some Random text");
}
MethodCalledHere(cons
当我试图运行下面的代码我得到这样的警告: warning: incompatible pointer to integer conversion assigning to
'char' from 'char *'; dereference with * [-Wint-conversion]
namesList[0]=name1;
这里是我的代码: int main(){