import java.util.*; 
public class ZiFu {
	public static void main(String args[]){
		 System.out.println("请输入你要截取的字符串:");
		  Scanner scan=new Scanner(System.in);
	       
		  String word=scan.next();
	        System.out.println(word+"的首位字符为"+word.substring(0,1));
	        System.out.println(word+"的末尾字符为"+word.substring(word.length()-1));
		
	}
}



相关文章:

  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2022-03-05
  • 2021-11-30
  • 2022-12-23
  • 2021-05-23
猜你喜欢
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
相关资源
相似解决方案