for循環(huán)應(yīng)該使用StringBuffer類,性能會比String高。代碼如下
String temp=sid.substring(1);
int i=Integer.parseInt(temp);
i++;
temp=String.valueOf(i);
StringBuffer buf=new StringBuffer();
buf.append("S");
int len=temp.length();
//湊夠七位
for(int j=0;j<7-len;j++){
buf.append("0");
}
sid=buf.append(temp).toString();
String temp=sid.substring(1);
int i=Integer.parseInt(temp);
i++;
temp=String.valueOf(i);
StringBuffer buf=new StringBuffer();
buf.append("S");
int len=temp.length();
//湊夠七位
for(int j=0;j<7-len;j++){
buf.append("0");
}
sid=buf.append(temp).toString();
2016-04-06
Session session = MyHibernateSessionFactory.getSessionFactory().getCurrentSession();
這一句的時候報錯:Type mismatch: cannot convert from org.hibernate.Session to javax.jms.Session
求解答!卡了好久了
這一句的時候報錯:Type mismatch: cannot convert from org.hibernate.Session to javax.jms.Session
求解答!卡了好久了
2016-04-06
Session session = MyHibernateSessionFactory.getSessionFactory().getCurrentSession();
這一句的時候報錯:Type mismatch: cannot convert from org.hibernate.Session to javax.jms.Session
這一句的時候報錯:Type mismatch: cannot convert from org.hibernate.Session to javax.jms.Session
2016-04-06
創(chuàng)建session的時候出問題了:Type mismatch: cannot convert from org.hibernate.Session to javax.jms.Session
我老師導(dǎo)入的jar包是一樣的,為什么會這樣呢求解答!
我老師導(dǎo)入的jar包是一樣的,為什么會這樣呢求解答!
2016-04-06
查詢的過程中,并不是對數(shù)據(jù)庫的修改,所以應(yīng)該是提交,而增刪改則是回滾,對嗎?
2016-04-05
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
為毛會出現(xiàn)和日志有關(guān)的錯誤
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
為毛會出現(xiàn)和日志有關(guān)的錯誤
2016-03-31
4分05秒中,modify.action后面加個問號然后協(xié)商sid的屬性,這樣就可以傳參數(shù)到action中?什么個原理???
2016-03-25