解题思路:
注意事项:
参考代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input =new Scanner(System.in);
String s = input.nextLine();
String sp = input.nextLine();
if(s.contains(sp))
System.out.print(sp + " " + "is substring of" + " " + s);
else if(sp.contains(s))
System.out.print(s + " " + "is substring of" + " " + sp);
else
System.out.print("No substring");
}
}
0.0分
0 人评分