The Artima Developer Community
Sponsored Link

Java Answers Forum
String Counting

1 reply on 1 page. Most recent reply: Jul 23, 2003 12:21 PM by Mr Plow

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Philip Pompili

Posts: 12
Nickname: ppompili
Registered: Jul, 2003

String Counting Posted: Jul 23, 2003 11:05 AM
Reply to this message Reply
Advertisement
How do I count the number of characters in a string, and then if someone enters a char, how do i see if that char exsists in that string.

Thanks


Mr Plow

Posts: 18
Nickname: mrplow
Registered: Jun, 2003

Re: String Counting Posted: Jul 23, 2003 12:21 PM
Reply to this message Reply
To find the anwsers to your questions, look at the Java API.
You can download it here: http://java.sun.com/j2se/1.4.1/download.html#docs

Once you have downloaded it, browse to the java.lang.String object and look at the public methods for the class. There you will find descriptions of how to use the methods length() and indexOf(int ch).

Flat View: This topic has 1 reply on 1 page
Topic: Dynamic Panel Previous Topic   Next Topic Topic: Java Logging API

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use