String类的转换功能:
package com.itheima_05;
/*
* String类的转换功能:
* char[] toCharArray():把字符串转换为字符数组
* String toLowerCase():把字符串转换为小写字符串
* String toUpperCase():把字符串转换为大写字符串
*
* 字符串的遍历:
* A:length()加上charAt()
* B:把字符串转换为字符数组,然后遍历数组
*/
public class StringDemo {
public static void main(String[] args) {
//创建字符串对象
String s = "abcde"; //char[] toCharArray():把字符串转换为字符数组
char[] chs = s.toCharArray();
for(int x=0; x<chs.length; x++) {
System.out.println(chs[x]);
}
System.out.println("-----------"); //String toLowerCase():把字符串转换为小写字符串
System.out.println("HelloWorld".toLowerCase());
//String toUpperCase():把字符串转换为大写字符串
System.out.println("HelloWorld".toUpperCase());
}
}

数组里面的长度是属性。String类里面的长度是方法。

Transformation functionality for the String class的更多相关文章

  1. HDU 5842 Lweb and String(Lweb与字符串)

    p.MsoNormal { margin: 0pt; margin-bottom: .0001pt; text-align: justify; font-family: Calibri; font-s ...

  2. HDU 5842 Lweb and String

    Lweb and String Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)T ...

  3. HDU 5842 Lweb and String (水题)

    Lweb and String 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5842 Description Lweb has a string S ...

  4. CCPC网络赛,HDU_5842 Lweb and String

    Problem Description Lweb has a string $S$. Oneday, he decided to transform this string to a new sequ ...

  5. 2016中国大学生程序设计竞赛 - 网络选拔赛 1011 Lweb and String

    Problem Description Lweb has a string S. Oneday, he decided to transform this string to a new sequen ...

  6. HDU 5842 Lweb and String 水题

    Lweb and String 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5842 Description Lweb has a string S ...

  7. Lweb and String 超级大水题

    Lweb and String Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)T ...

  8. [Java 安全]加密算法

    Base64编码 算法简述 定义 Base64内容传送编码是一种以任意8位字节序列组合的描述形式,这种形式不易被人直接识别. Base64是一种很常见的编码规范,其作用是将二进制序列转换为人类可读的A ...

  9. Autofac

    程序集准备 Assembly: Autofac/Autofac.Integration.Mvc/System.Web.Mvc/System.Web.Helpers/System.Web.WebPage ...

随机推荐

  1. Centos6.7安装Pycharm及升级JDK

    首先到pycharm官网下载pycharm压缩包 wget https://www.jetbrains.com/pycharm/download/download-thanks.html?platfo ...

  2. Django中url的反向查询

    明确几个概念: application namespace:   正在部署的app的名称,一个app的多个实例应该具有相同的application namespace.   可以通过在URLconf模 ...

  3. JAVA跨域资源访问CORSFilter

    当一个资源从与该资源本身所在的服务器不同的域或端口不同的域或不同的端口请求一个资源时,资源会发起一个跨域 HTTP 请求. 出于安全考虑,浏览器会限制从脚本内发起的跨域HTTP请求.跨域资源共享机制允 ...

  4. golang协程池

    type GoroutinePoll struct { Queue chan func() error Total, Num int Result chan error FinishCallBack ...

  5. 数据库--oracle图形化管理工具和新增自定义用户

    oracle数据库图形化管理工具: 1 navicat工具很小,操作mySQL和SQLServer非常好用,但对于oracle体验性就有点差,要自己下载编码和替换oci文件.下面是解决的方法教程链接 ...

  6. C和C++结构体的区别

    C的结构体内不允许有函数存在,C++允许有内部成员函数,且允许该函数是虚函数.所以C的结构体是没有构造函数.析构函数.和this指针的. C的结构体对内部成员变量的访问权限只能是public,而C++ ...

  7. win7下如何解决对方可以ping通我,但我ping不通对方问题

    以下是在百度经验里面找到的文章:http://jingyan.baidu.com/article/6b97984da3ac851ca2b0bfe1.html 当我在虚拟机的linux系统中ping本机 ...

  8. Python使用Redis数据库

    Redis 简介 Redis是开源的高性能Key-Value数据库,可以用于缓存等用途. Redis可以提供事务和持久化支持保证并发安全性,并提供TTL(time to life)服务. 使用Redi ...

  9. IOS第三方之SVProgressHUD

    这个第三方和MBProgressHUD差不多,也挺简单的. // // ViewController.m // ProgressHUD // // Created by City--Online on ...

  10. VB如何连接访问数据库Access

    VB如何连接访问数据库Access 听语音 | 浏览:10675 | 更新:2015-05-05 11:26 | 标签:连接 access 1 2 3 4 5 6 7 分步阅读 VB即Visual B ...