package com.shb.java;
/**
* 取出第一个重复的字符
* @author shaobn
* @date 2016-9-28
* @package_name com.shb.java
*/
public class Demo10 { /**
* @param args
* @date 2016-9-28
* @author shaobn
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
// findFirstRepeat("wqyqwyer23tdd",11);
reverseStr("hello",2);
}
// /**
// * 实现方法
// * @param str
// * @param n
// * @date 2016-9-28
// * @author shaobn
// */
// public static void findFirstRepeat(String str,int n){
// char[] ch = str.toCharArray();
// out: for(int i=0;i<n-1;i++){
// for(int j = i+1;j<n;j++){
// if(ch[i]!=ch[j]){
// continue;
// }else {
// System.out.println(ch[i]);
// break out;
// }
// }
//
// }
//
//
// }
/**
* 字符串的旋转 前n个字符排到后边,而后边的往前移动
* @param str
* @param n
* @date 2016-9-29
* @author shaobn
*/
public static void reverseStr(String str,int n){
String string = str.substring(0, n+1);
String string2 = str.substring(n+1);
String string3 = string2.concat(string);
System.out.println(string3);
} }

最新文章

  1. appium实现截图和清空EditText
  2. PHP运算符
  3. javascript模块化详解
  4. IIS6的SSL配置,如何配置SSL到登陆页,如何将SSL证书设置成受信任的证书
  5. Linux学习笔记(6)-工作管理
  6. IIS tomcat共用80端口解决一个IP多个域名:使用Nginx反向代理方式使两者兼容
  7. MongoDB(三)——CRUD
  8. OC-之AFNetworking
  9. Shell:进程的层级关系
  10. LearningDocker--Chapter3--Building images
  11. 启动链码报rpc error: code = Unimplemented desc = unknown service protos.ChaincodeSupport start error
  12. 9. VIM 系列 - YouCompleteMe 实现代码补全
  13. tar解压指定文件
  14. Anatomy of a Database System学习笔记 - 查询
  15. F#.NET周报 2018第34周-Ionide下载量100万
  16. bootstrap table 前端搜索
  17. C语言概述
  18. 判断Mouse事件源类型
  19. 北风网VIP6级学习视频地址
  20. hadoop(二)hadoop集群的搭建

热门文章

  1. 在Windows7下启动MongoDB服务的解决方案
  2. maven创建web工程,并导入到eclipse中
  3. 1019 JDBC链接数据库进行修删改查
  4. R中创建not-yet-evaluated对象
  5. House Robber
  6. Greenplum各种Tips(不定时更新)
  7. MySQL Server-id踩到的坑
  8. 代理模式 &amp; Java原生动态代理技术 &amp; CGLib动态代理技术
  9. JS开发windows phone8.1系列之1
  10. DOM概述