String转换为int String 字符串转整型 int 有以下两种方式: Integer.parseInt(str) Integer.valueOf(str).intValue() 注意:Integer 是一个类,是 int 基本数据类型的封装类。后续会讲到。 例如下面代码所示: public ...
分类:
编程语言 时间:
2020-07-19 16:11:11
阅读次数:
63
char * intToRoman(int num){ int symInt[13]={1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; char *symStr[13]={"M", "CM", "D", "CD", "C", ...
分类:
其他好文 时间:
2020-07-19 00:46:43
阅读次数:
63
学习内容:包装类 1.Integer型包装类 代码实现: public class Integer包装类 { public static void main(String[] args) { // TODO 自动生成的方法存根Integer a1=new Integer(15);//创建方法一Int ...
分类:
编程语言 时间:
2020-07-18 22:44:51
阅读次数:
81
Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specificat ...
分类:
其他好文 时间:
2020-07-18 21:49:07
阅读次数:
59
1.使用wait()/notifyAll实现生产者和消费者 1 /** 2 * 锁对象类 3 * 协作类 4 */ 5 public class MyQueue { 6 private Queue<Integer> queue; 7 private int limit; 8 9 public MyQ ...
分类:
编程语言 时间:
2020-07-18 15:30:39
阅读次数:
71
1、准备数据 1) 创建索引 2) 创建mapping JSON数据如下 { "properties": { "id": { "type": "long" }, "age": { "type": "integer" }, "username": { "type": "keyword" }, "nic ...
分类:
其他好文 时间:
2020-07-18 15:24:23
阅读次数:
90
一,为什么要引入泛型? 1,可以统一集合中的数据类型 2,可以减少强制类型转换 3,泛型其实就是编译器检查类型 二,泛型语法如何实现? E指的是element,可以是各种各样的类型 1,Map使用泛型 // maps 中的key只能是String类型,value只能是Integer类型 Map<St ...
分类:
编程语言 时间:
2020-07-18 11:32:31
阅读次数:
78
今天学习对象的包装,Java提供了八种基本数据类型的包装类。包装类均位于java.lang包中。包装类基本数据对应关系。 包装类主要是为了方便对对象的操作。每个包装类都有对自己操作的方法。并且可以实现数据之间转换如int与Integer类类直接转换,而且可以输出二进制或十六进制值。 除此之外,包装类 ...
分类:
编程语言 时间:
2020-07-18 00:49:26
阅读次数:
65
一、普通分页 使用sql语句 limit 起使位置, 步长a、接口 List<User> getLimitUser(Map<String, Integer> map); b、接口配置文件 <select id="getLimitUser" resultType="user" parameterTyp ...
分类:
其他好文 时间:
2020-07-17 22:22:46
阅读次数:
74
https://codeforces.com/problemset/problem/489/C C. Given Length and Sum of Digits... You have a positive integer m and a non-negative integer s. Your ...
分类:
其他好文 时间:
2020-07-17 22:18:10
阅读次数:
71