public class StringAPIDemo {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String str1="耿丹计算机Java20170320";
System.out.println(str1.charAt(9));
System.out.println(str1.charAt(10));
System.out.println(str1.charAt(11));
System.out.println(str1.charAt(12));
System.out.println(str1.charAt(13));
System.out.println(str1.charAt(14));
System.out.println(str1.charAt(15));
System.out.println(str1.charAt(16));

}

}

public class StringAPIDemo12 {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String str="耿丹计算机Java20170320";
String newStr=str.replaceAll("Java","J2EE");
System.out.println("替换之后的结果:"+newStr);
}

}

public class StringAPIDemo06 {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String str1=" 耿丹 计算机 Java 20170320 ";
System.out.println(str1.trim());
}

}

zuoyeQAQ的更多相关文章

随机推荐

  1. IAR新建MSP430工程

    一.在IAR官网下载IAR for MSP430 软件 https://www.iar.com/iar-embedded-workbench/#!?architecture= 选择MSP430,然后 ...

  2. C++中的函数

    1.函数的定义和调用 函数的定义形式 返回类型 函数名(形式参数) { 语句序列: } 函数的调用 调用:声明函数原型,函数调用 声明函数原型:类型说明符 被调函数名(含类型说明的形参表) 函数调用: ...

  3. Hadoop学习总结之Map-Reduce的过程解析

    一.客户端 Map-Reduce的过程首先是由客户端提交一个任务开始的. 提交任务主要是通过JobClient.runJob(JobConf)静态函数实现的: public static Runnin ...

  4. Android开发——LinearLayout和RelativeLayout的性能对比

    0. 前言 我们都知道新建一个Android项目自动生成的Xml布局文件的根节点默认是RelativeLayout,这不是IDE默认设置,而是由android-sdk\tools\templates\ ...

  5. 【MongoDB】NoSQL Manager for MongoDB 教程(基础篇)

    前段时间,学习了一下mongodb,在客户端工具方面,个人认为 NoSQL Manager for MongoDB 是体验比较好的一个,功能也较齐全.可惜在找教程的时候,发现很难找到比较详细的教程,也 ...

  6. day 12 文件操作

    1.文件定位读写  f.seek(2,0) ##### f.seek(2,0) In [4]: f = open("test.py","r") In [5]: ...

  7. day2 Ubuntu配置源

    1.寻找国内镜像源 https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ 2.配置source  list源 sources.list系统自带的,源是来U ...

  8. Flutter系列博文链接

    Flutter系列博文链接 ↓: Flutter基础篇: Flutter基础篇(1)-- 跨平台开发框架和工具集锦 Flutter基础篇(2)-- 老司机用一篇博客带你快速熟悉Dart语法 Flutt ...

  9. hive 动态分区插入

    首先需要进行以下设置: set hive.exec.dynamic.partition=true; set hive.exec.dynamic.partition.mode=nonstrict; se ...

  10. jquery Ajax请求中显示Loading...

    jquery Ajax请求中显示Loading... $('#btnTest').click(function(){      $.ajax({           url ---- ,根据你需要设置 ...