• Post Reply Bookmark Topic Watch Topic
  • New Topic

indexOf() of String  RSS feed

 
mi te
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why the method of String, int indexOf(int ch), takes in an argument of type int? Why not the type char?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess: a historical mistake. Similar routines in the C language standard library take int arguments.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!