📌  相关文章
📜  java中的程序.从用户那里获取一个字符串,并验证它的长度应该至少为 1.将此字符串传递给一个方法,该方法返回一个新字符串,并在前面和结尾添加第一个字符,因此“cat”产生“ccatc”. - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:13.839000             🧑  作者: Mango

代码示例2
Q#1 Get a string from user and also validate it’s length should be at least 1. Pass this string to a method that
returns a new string with the first char added at the front and end, so "cat" yields "ccatc".