当前位置:网站首页>中通笔试题:翻转字符串,例如abcd打印出dcba
中通笔试题:翻转字符串,例如abcd打印出dcba
2022-07-01 20:21:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
翻转一个字符,比如:abcd—>dcba
public class 倒转字符串 {
public static void main(String[] args) {
System.out.print("翻转后字符串:" );
String str = "abcde";
for (int i = str.length()-1; i>=0; i--) {
System.out.print(str.charAt(i));
}
} // 翻转后字符串:edcba
}
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/147186.html原文链接:https://javaforall.cn
边栏推荐
猜你喜欢
Uniapp uses Tencent map to select points without window monitoring to return users' location information. How to deal with it
多个张量与多个卷积核做卷积运算的输出结果
【Opencv450】HOG+SVM 与Hog+cascade进行行人检测
Halcon知识:三维重构的一个尝试
Comprehensive evaluation and detailed inventory of high-quality note taking software (I) note, obsedian, remnote, flowus
2022安全员-A证考题及在线模拟考试
Data analysts sound tall? Understand these points before you decide whether to transform
极客DIY开源方案分享——数字幅频均衡功率放大器设计(实用的嵌入式电子设计作品软硬件综合实践)
Entering Ruxin Town, digital intelligence transformation connects "future community"
以飞地园区为样本,看雨花与韶山如何奏响长株潭一体化发展高歌
随机推荐
How to create a pyramid with openmesh
九章云极DataCanvas公司蝉联中国机器学习平台市场TOP 3
Test of NSI script
leetcode刷题:二叉树02(二叉树的中序遍历)
新牛牛盲盒微信小程序源码_支持流量变现,带完整素材图片
8K HDR!|为 Chromium 实现 HEVC 硬解 - 原理/实测指南
Accelera Systems Initiative是一个独立的非营利组织
Architect graduation summary
Principle of motion capture system
杰理之、产线装配环节【篇】
Write blog documents
Détection des cibles - série Yolo
杰理之、产线装配环节【篇】
Simple but modern server dashboard dashdot
Vulnerability recurrence - Net ueeditor upload
架构师毕业总结
2022安全员-A证考题及在线模拟考试
2022年低压电工考试试题及答案
Items in richview documents
浏览器tab页之间的通信