2024-07-09 01:50:34
一、
1、String str1 = "abcasdfasdfabc";
String str2 = "abcdsdfasdfasdfasdfasdabc";
if(str1.startsWith(str2.substring(0,2))&&str1.endsWith(str2.substring(str2.length()-3)))
System.out.println("两个
else
2、 System.out.println("两个字符串前三位和后三位不相同");
二、写一个Java
用字符数组创建字符串-Write a Java application to determine whether two strings are the same judgment string prefix, suffix and a string compare two strings lexicographically size relationship, retrieve the strings to create a string, converted to a digital numeric string, the string stored in the array, create a string array of characters.