import java.util.*;
public class Solution {
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
*
* @param message string字符串
* @param keyword string字符串
* @return int整型
*/
public int findKeyword (String message, String keyword) {
// write code here
if(message.contains(keyword)){
return message.indexOf(keyword);
}
return -1;
}
}
本题考察字符串基本函数的实现,所用编程语言是java。
大家偷懒的话可以直接使用java的库函数,否则自己代码实现库函数功能

京公网安备 11010502036488号