String.indexOf()的用途: 返回此字符串中第一个出现的指定的子字符串,如果没有找到则返回-1 源码如下: /** * Returns the index within this string of the first occurrence of the * specified substring. * * <p>The returned index is the smallest value <i>k</i> for which: * <blockq
[转]Hibernate的getSQLQuery方法对char类型的解析问题 建立数据库: create table T_TEST1( id char (32), name varchar (255), other varchar (255), primary key(id) )insert into T_TEST1 values('2c9090792a18d6ab012a18d77e700001','sfasdf','asdf') insert into T_TEST1 values('2c9
package com.s.x; //indexOf()方法从字符起始处的第一个位子开始的位置 //substring public class Wang { public static void main(String[] args) { String s = "This is my original srting "; String s2 = s.substring(2);// is my origianl string // 或者 // s = s.substring(4); S