PROBLEM:
String s (of indeterminate length) is passed to the method searchString(), the user is prompted to enter a one character search argument name s1. Object of the exercise is to count the number of times
s1 occurs within s, regardless of case h = H, H = h, as it were.
CAN ANYONE FIGURE OUT WHERE I AM GOING WRONG.
THIS IS THE METHOD CALL
THIS IS THE METHOD
COMPILER MESSAGES
MyStrings.java [154:1] char cannot be dereferenced
char s2 = s1.charAt( 0 ).toLowerCase( ) ;
^
MyStrings.java [162:1] char cannot be dereferenced
s2 = ( s1.charAt( 0 ).toUpperCase( ) );
^
2 errors
Errors compiling MyStrings.
THANK YOU
doug
