Expand|Select|Wrap|Line Numbers
- class Search
- {
- public static void main (String[] args)
- {
- int position;
- int counter = 0;
- String para;
- para = Keyin.inString("insert a paragraph");
- do {
- position = para.indexOf(' ');
- para = para.substring ( position + 1, para.length () -1);
- counter = counter + 1;
- } while ( position != null ) ;
- counter = counter + 1 ;
- System.out.println(counter);
- }
- }
incomparable types: int and <nulltype>
} while ( position != null ) ;
^
HEHE any suggestions :P