Results 1 to 5 of 5
Thread: String operations..
- 12-13-2007, 07:39 PM #1
Member
- Join Date
- Nov 2007
- Posts
- 50
- Rep Power
- 0
- 12-13-2007, 08:39 PM #2
Check this tutorial:
http://www.java-forums.org/java-tuto...va-string.html
- 12-14-2007, 12:28 AM #3
Member
- Join Date
- Nov 2007
- Posts
- 50
- Rep Power
- 0
thankq,
i learned more about string from that tutorial.
but i couldn't get answer to my question from that.
i want to varify the presence of particular sequence of characters in a string.
(for example we have to check the presence of "java" in the string "string operations in java ".)
such method have to return boolean type date depends on the presence of string.
is there any such method ?
please tell me...
- 12-14-2007, 02:00 AM #4
Member
- Join Date
- Nov 2007
- Posts
- 11
- Rep Power
- 0
A small example to get you started.
Java Code:import java.util.*; public class FindString { public static void main(String args[]) { String s1 = "String operations in java"; if(s1.indexOf("java")>-1) System.out.println("Found"); else System.out.println("Not found"); } }
- 12-14-2007, 02:04 AM #5
Senior Member
- Join Date
- Nov 2007
- Location
- Newport, WA
- Posts
- 141
- Rep Power
- 0
Similar Threads
-
Stack push/pop/peek operations
By Java Tip in forum Java TipReplies: 0Last Post: 01-29-2008, 09:03 AM -
Uses unchecked or unsafe operations message
By Robbinz in forum New To JavaReplies: 2Last Post: 12-06-2007, 10:56 PM -
Using java.util.Scanner to search for a String in a String
By Java Tip in forum Java TipReplies: 0Last Post: 11-20-2007, 04:59 PM -
Help with insertName(String name) and deleteName(String name)
By trill in forum New To JavaReplies: 1Last Post: 08-07-2007, 07:29 AM -
I can't seem to pass the value of a string variable into a string array
By mathias in forum Java AppletsReplies: 1Last Post: 08-03-2007, 10:52 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks