当前位置:网站首页>中通笔试题:翻转字符串,例如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刷题:二叉树03(二叉树的后序遍历)
- Halcon知识:三维重构的一个尝试
- Big factories are wolves, small factories are dogs?
- 股票手机开户哪个app好,安全性较高的
- 【智能QbD风险评估工具】上海道宁为您带来LeanQbD介绍、试用、教程
- What else do you not know about new set()
- 300题线性代数 第四讲 线性方程组
- 新版Free手机、PC、平板、笔记本四端网站缩略展示图在线一键生成网站源码
- Learn white box test case design from simple to deep
- Write blog documents
猜你喜欢
[multithreading] lock strategy
宅男壁纸大全微信小程序源码-带动态壁纸支持多种流量主
以飞地园区为样本,看雨花与韶山如何奏响长株潭一体化发展高歌
Comprehensive evaluation and detailed inventory of high-quality note taking software (I) note, obsedian, remnote, flowus
300题线性代数 第四讲 线性方程组
leetcode刷题:二叉树02(二叉树的中序遍历)
目標檢測——Yolo系列
Uniapp uses Tencent map to select points without window monitoring to return users' location information. How to deal with it
Common components of flask
EDA工具对芯片产业的重要性知识科普
随机推荐
ngnix基础知识
Spark面试题
【Leetcode】最大连续1的个数
Iframe parent-child page communication
股票手机开户哪个app好,安全性较高的
图片拼图微信小程序源码_支持多模板制作和流量主
Using qeventloop to realize synchronous waiting for the return of slot function
最近公共祖先离线做法(tarjan)
EMC-电路保护器件-防浪涌及冲击电流用
杰理之烧录都使用 VBAT 供电,供电电压 4.2V【篇】
Write blog documents
功利点没啥!
编译原理复习笔记
如果浏览器被意外关闭,react怎么缓存用户填写的表单?
leetcode刷题:栈与队列02(用队列实现栈)
实战项目笔记(一)——虚拟机的创建
芭比Q了!新上架的游戏APP,咋分析?
Slf4j打印异常的堆栈信息
Customize the insertion of page labels and realize the initial search of similar address books
最近公共祖先(LCA)在线做法