Wesley13 Wesley13
4年前
java判断字符串是否为数字或中文或字母
1.判断字符串是否仅为数字:1用JAVA自带的函数public static boolean isNumeric(String str){  for (int i  str.length();i0;){      if (!Character.isDigit(str.charAt(i))){
Wesley13 Wesley13
4年前
java学习_5_21
数组的插入、删除、扩容本质上都是用的数组的复制。Java中数组的拷贝如下:System.arraycopy(Objectsrc,intsrcPos,Objectdest,intdestPos,intlength)1publicclassArrayCopy1{2publicstaticv
Stella981 Stella981
4年前
MyBatis where标签语句
当 where 中的条件使用的 if 标签较多时,这样的组合可能会导致错误。当 java 代码按如下方法调用时:@Testpublicvoidselect_test_where(){UserusernewUser();user.setUsername(null);
Wesley13 Wesley13
4年前
JAVA实现双向链表的增删功能
JAVA实现双向链表的增删功能,完整代码  1.packagelinked;3.classLinkedTable{5.}6.publicclassLinkedTableTest{8.  //构造单链表9.  staticNodenode1newNode("name1");10.
可莉 可莉
4年前
20个常用java代码段
下面是20个非常有用的Java程序片段,希望能对你有用。1\.字符串有整型的相互转换12StringaString.valueOf(2);//integertonumericstringint iInteger.parseInt(a);//numericstringtoanin
Stella981 Stella981
4年前
CentOS6.7 i686上安装JDK7
内核版本:root@heima01javaunameaLinuxheima012.6.32573.el6.i6861SMPThuJul2312:37:35UTC2015i686i686i386GNU/Linux发行版本:root@heima01java
Wesley13 Wesley13
4年前
Java提高篇——equals()与hashCode()方法详解
阅读目录equals()方法详解hashcode()方法详解Hashset、Hashmap、Hashtable与hashcode()和Equals()的密切关系java.lang.Object类中有两个非常重要的方法:publicbooleanequals(Objectobj)pub
Wesley13 Wesley13
4年前
Java日期时间API系列26
Java8中为年月新增了类YearMonth,可以用来表示卡片过期时间等问题。1.YearMonth默认格式为:2007121.1部分源码\\@implSpec\Thisclassisimmutableandthreadsafe.\\@since1.8
Wesley13 Wesley13
4年前
Java编写代理服务器
Java编写代理服务器(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Fwww.freebuf.com%2Farticles%2Fweb%2F21832.html)
java小知识-纳秒
作者:京东物流崔冬冬一、System.nanoTime()java中,有这么一个方法System.nanoTime(),你用过吗?二、与System.currentTimeMillis()对比System.currentTimeMillis()我们经常使用