博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
算法常用api总结
阅读量:3960 次
发布时间:2019-05-24

本文共 580 字,大约阅读时间需要 1 分钟。

//将字符串转化为char数组String str = "abc";char[] array = str.toCharArray();//将char数组转化为字符串char[] chars = {
'a', 'b', 'c', 'd'};String arr = new String(chars);//"abcd"//将数字或者字符进行排序char[] array = {
'c', 'b', 'a'};Arrays.sort(array);array = {
'a', 'b', 'c'};//将集合转化为数组int[] ints = list.stream().mapToInt(Integer::intValue).toArray();//将字符串转化为整型数字Integer.parseInt(String s)//对集合进行排序 升序list.sort((o1, o2)->{
return o1 - o2;});//对数组进行复制 将nums1从第0个开始 复制到temp 也是从第0个开始复制 复制m个System.arraycopy(nums1, 0, temp, 0, m);//把字符变成数字 char s = '1'; int i = s - '0'; System.out.println(i);//1

转载地址:http://klhzi.baihongyu.com/

你可能感兴趣的文章
autoit3 ie.au3 函数之——_IEDocGetObj
查看>>
autoit3 ie.au3 函数之——_IEDocInsertHTML
查看>>
autoit3 ie.au3 函数之——_IEDocWriteHTML
查看>>
autoit3 ie.au3 函数之——_IEErrorHandlerDeRegister & _IEErrorHandlerRegister
查看>>
autoit3 ie.au3 函数之——_IEErrorNotify
查看>>
autoit3 ie.au3 函数之——_IEFormElementCheckBoxSelect & _IEFormGetObjByName
查看>>
autoit3 ie.au3 函数之——_IEFormElementGetCollection & _IEFormGetCollection
查看>>
watir测试报告(一)
查看>>
watir测试报告(二)
查看>>
watir——上传文件
查看>>
Python之读取TXT文件的三种方法
查看>>
Python之操作MySQL数据库
查看>>
watir学习之—如何遍历页面所有的超链接
查看>>
ruby之——安装gem提示:Please update your PATH to include build tools or download the DevKit
查看>>
Selenium-Webdriver系列教程(一)————快速开始
查看>>
Selenium-Webdriver系列教程(2)———浏览器的简单操作
查看>>
Selenium-webdriver系列教程(3)———如何执行一段js脚本
查看>>
Selenium-webdriver系列教程(4)——如何定位测试元素
查看>>
Selenium-webdriver系列教程(5)———如何定位frame中的元素
查看>>
Selenium-webdriver系列教程(6)———如何捕获弹出窗口
查看>>