Computer Science, asked by sivanichowdaryuppala, 3 months ago

find the word java pls ans this​

Answers

Answered by Anonymous
0

Answer:

How to search a word inside a string ?

public class SearchStringEmp {

public static void main(String[] args) {

String strOrig = "Hello readers";

int intIndex = strOrig. indexOf("Hello");

if(intIndex == - 1) {

System. out. println("Hello not found");

} else {

println("Found Hello at index "+ intIndex

Similar questions