aspose file tools
The moose likes Beginning Java and the fly likes indexOf() of String Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "indexOf() of String" Watch "indexOf() of String" New topic
Author

indexOf() of String

mi te
Greenhorn

Joined: Mar 09, 2006
Posts: 29
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
Marshal

Joined: Jul 08, 2003
Posts: 24054
    
  13

My guess: a historical mistake. Similar routines in the C language standard library take int arguments.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: indexOf() of String
 
Similar Threads
Highlight the search field in a text area -----HELP required URGENT
indexOf(int ch)
comparing characters
Highlight text in a a JTextPane
Sun String IndexOf method API Question