当前位置:网站首页>中通笔试题:翻转字符串,例如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
边栏推荐
- 合成大西瓜小游戏微信小程序源码/微信游戏小程序源码
- leetcode刷题:二叉树01(二叉树的前序遍历)
- 【STM32】STM32CubeMX教程二–基本使用(新建工程点亮LED灯)
- 目标检测——Yolo系列
- UVM教程
- Slf4j打印异常的堆栈信息
- 东哥套现,大佬隐退?
- NIO与传统IO的区别
- Uniapp uses Tencent map to select points without window monitoring to return users' location information. How to deal with it
- Internship: gradually moving towards project development
猜你喜欢
Myslq ten kinds of locks, an article will take you to fully analyze
leetcode刷题:二叉树02(二叉树的中序遍历)
Importance of EDA tools to chip industry knowledge popularization
PWN攻防世界cgpwn2
300题线性代数 第四讲 线性方程组
【智能QbD风险评估工具】上海道宁为您带来LeanQbD介绍、试用、教程
芭比Q了!新上架的游戏APP,咋分析?
Penetration tools - trustedsec's penetration testing framework (PTF)
随机头像大全,多分类带历史记录微信小程序源码_支持流量主
最近公共祖先离线做法(tarjan)
随机推荐
Customize the insertion of page labels and realize the initial search of similar address books
C中main函数的几种写法
【let var const】
NSI脚本的测试
从20s优化到500ms,我用了这三招
人才近悦远来,望城区夯实“强省会”智力底座
leetcode刷题:栈与队列01(用栈实现队列)
ngnix基础知识
leetcode刷题:栈与队列02(用队列实现栈)
2022安全员-B证考试练习题模拟考试平台操作
UVM教程
PLC模拟量输入 模拟量转换FB S_ITR(三菱FX3U)
收藏:存储知识全面总结
How to create a pyramid with openmesh
考虑关系的图卷积神经网络R-GCN的一些理解以及DGL官方代码的一些讲解
NIO与传统IO的区别
Gaussdb (for MySQL):partial result cache, which accelerates the operator by caching intermediate results
Flume面试题
关联线探究,如何连接流程图的两个节点
Oracle deadlock test