public class Str_turn
{
public static void main(String args[])
{
String Str1 = new String("This is a book.");
char temp[]=Str1.toCharArray();
temp[temp.length-2]-=32;
if(temp[0]<91) temp[0]+=32;
String Str2 ="";
for(int i=temp.length-2; i>=0; i--)
Str2+=temp[i];
Str2+=temp[temp.length-1];
System.out.println(Str2);
}
}

Str_turn的更多相关文章

随机推荐

  1. June 03rd 2017 Week 22nd Saturday

    Truth and roses have thorns about them. 真理和玫瑰,身边都有刺. Yesterday, I met with a young, beautiful profes ...

  2. java--final 类在程序中的影响

    很多时候我都记不住也弄不太清楚final类在程序的中的作用到底为何,今天正好看到了,就把它记下来,省的以后忘了的时候到处找资料~ final修饰符对程序的影响总的来说有三点: (1)final可以修饰 ...

  3. 716. Max Stack (follow up questions for min stack)

    Design a max stack that supports push, pop, top, peekMax and popMax. push(x) -- Push element x onto ...

  4. hdu-1754 I Hate It---线段树模板题

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1754 题目大意: 求区间最大值+单点修改 解题思路: 直接套用模板即可 #include<bi ...

  5. luogu P1121 环状最大两段子段和

    嘟嘟嘟 一道说难也难说简单也简单的dp题. 我觉得我的(有篇题解)做法就属于特别简单的. 平时遇到环的问题都是断环为链,但这道题给了一种新的思路. 观察一下,最后的答案无非就这两种:xxx--xx-- ...

  6. U3

    一个项目里面可以有多个Activity AndroidManifest.xml<intent-filter> <action android:name="android.i ...

  7. Strtus2框架使用HttpServletResponse响应数据

    -----------------------------------------------------------------------------------------jsp-------- ...

  8. idea + maven + webapp 项目搭建

    1.File-> New -> Project

  9. genil层

    genil 层将底层的业务逻辑封装成一个接口(例如 get_dynamic_result这种),供ui层调用(ui点击 search dynamic result按钮,会调用 get_dynamic_ ...

  10. [luoguP3325][HNOI2012]矿场搭建

    P3225 [HNOI2012]矿场搭建 题目描述 煤矿工地可以看成是由隧道连接挖煤点组成的无向图.为安全起见,希望在工地发生事故时所有挖煤点的工人都能有一条出路逃到救援出口处.于是矿主决定在某些挖煤 ...