public class Test12 {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner input = new Scanner(System.in);

        System.out.println("请输入一个字符串:");

        String str = input.next();

        for (int i = str.length() - 1; i >= 0; i--) {
            char ch = str.charAt(i);

            System.out.print(ch);

        }

    }

}

Java开发中经典的小实例-(字符串倒序输出)的更多相关文章

  1. Java开发中经典的小实例-(字符串比较)

    //输入字符串然后与自己定义的数组进行对比,并输出重复次数. public class Test11 {    public static void main(String[] args) {     ...

  2. Java开发中经典的小实例-(二分法)

    public int binarySearch(int[] data,int aim){//以int数组为例,aim为需要查找的数 int start = 0; int end = data.leng ...

  3. Java开发中经典的小实例-(while(参数){})

    import java.util.Scanner;public class Test_while {    public static void main(String[] args) {       ...

  4. Java开发中经典的小实例-(输入三个数字判断三角形类型)

    import java.util.Scanner;public class threeTest {    public static void main(String[] args) {       ...

  5. Java开发中经典的小实例-(打印输入重复的值)

    import java.util.ArrayList;import java.util.Scanner;public class Test8 {    public static void main( ...

  6. Java开发中经典的小实例-(swich(){case:参数break;default: break;})

    import java.util.Scanner;public class Test6 {    public static void main(String[] args) {        // ...

  7. Java开发中经典的小实例-(能被3整除,并且十个数换一行)

    import java.util.Scanner;public class Test15 {    public static void main(String[] args) {        // ...

  8. Java开发中经典的小实例-(do{}while())

    import java.util.Scanner;public class Test13 {    public static void main(String[] args) {        // ...

  9. Java开发中经典的小实例-(随机产生验证码)

    import java.util.Scanner;public class Test10 {    public static void main(String[] args) {        // ...

随机推荐

  1. IOS第18天(9,核心动画-动画组)

    ****动画组 // 核心动画都是假象,不能改变layer的真实属性的值// 展示的位置和实际的位置不同.实际位置永远在最开始位置 #import "HMViewController.h&q ...

  2. 怎样成为全栈工程师(Full Stack Developer)?

    "Facebook 工程师说 Facebook 只招 full stack engineer,那么 Facebook engineer 都是怎样的人啦."? 具体经验不重要,重要的 ...

  3. chrome下input[type=text]的placeholder不垂直居中的问题解决

    http://blog.csdn.net/do_it__/article/details/6789699 <input type="text" placeholder=&qu ...

  4. Linux下暴力破解工具Hydra详解

    一.简介 Number one of the biggest security holes are passwords, as every password security study shows. ...

  5. LeetCode Strobogrammatic Number II

    原题链接在这里:https://leetcode.com/problems/strobogrammatic-number-ii/ 题目: A strobogrammatic number is a n ...

  6. Windows Server 2008 R2 DNS服务器迁移

    一.实验模拟环境: Zhuyu公司有一个DNS服务器,因DNS服务器比较老旧,准备迁移至新的DNS服务器上(DNS备份也可以这么操作). 旧DNS服务器: 主机名: test-zhuAD        ...

  7. Saving changes is not permitted in SQL Server

    From Save (Not Permitted) Dialog Box on MSDN : The Save (Not Permitted) dialog box warns you that sa ...

  8. Chrome浏览器M53更新后超链接的dispatchEvent(evt)方法无法触发文件下载

    一个经典的js前台文件下载方法: var aLink = document.createElement('a'); var datatype="data:text/plain;charset ...

  9. Mysql----------的一些常用命令

    1.查询一张表中某个字段重复值的记录 select id,cert_number from (select id,cert_number,count(*)as n from 表明 group by c ...

  10. 原生js快速渲染dom节点

    function renderDom(str){ var _div = document.createElement('div'); _div.innerHTML = str; var dom_tem ...