Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : java

javaÓëÂÒÂë

UTF8ת»»³ÉGB2312 µ±ÎÒÃÇÔÚ»ùÓÚHTTPЭÒéµÄJSP»òServletµÄÓ¦ÓÃÖлñÈ¡Êý¾Ý»ò·¢ËÍÇëÇóʱ£¬JVM»á°ÑÊäË͵ÄÊý¾Ý±àÂë³ÉUTF8¸ñʽ¡£Èç¹ûÎÒÃÇÖ±½Ó´ÓHTTPÁ÷ÖÐÌáÈ¡ÖÐÎÄÊý¾Ý£¬ÌáÈ¡µÄ½á¹ûΪ“????”£¨¿ÉÄܸü¶àÎʺţ©£¬Îª×ª»»³ÉÎÒÃÇÄܹ»Àí½âµÄÖÐÎÄ×Ö·û£¬ÎÒÃÇÐèÒª°ÑUTF8ת»»³ÉGB2312£¬½èÖúISO-8859-1±ê×¼±àÂëÄܹ»ÇáÒ×µÄʵÏÖ¡£
ºº×ÖÇøλÂ룺½«ºº×Ö¶¨ÒåÔÚÒ»¸ö94ÐУ¬94ÁеıíÖУ¬³£Óúº×ÖÔÚ16-55ÐУ¬ÆäËûºº×ÖÔÚ56-87ÐУ¬·ûºÅÔÚ1-9Çø£¬ÆäËûÐÐ䶨Ò壬ÆäÖÐ55ÐеĵÚ90ÁÐÖÁ94ÁÐ䶨Òå¡£±ÈÈ磬“Íò”×ÖµÄÇøλÂëÊÇ 45 82£¬ ÔÚ45ÐУ¬82ÁС£
ºº×Ö¹ú±êÂ룺Óֳƽ»»»Â룬ÊÇÒ»¸öÂ뼯¡£½«ÇøλÂëµÄÊ®½øÖÆÐÐÁÐֵת»»³É16½øÖÆ£¬ÔÙ·Ö±ð¼ÓÉÏ20HµÃµ½¡£¾ÙÀý£º½«“Íò”µÄÇøλÂëת»»Îª16½øÖƱíʾ:2D 52,·Ö±ð¼ÓÉÏ20HµÃ£º4D 72£¬¼´Îª¹ú±êÂë¡£
ÓÉ´Ë£¬ºº×ÖµÚÒ»¸ö×Ö½ÚµÄ×îСֵ£º10H + 20H =30H, ×î´óÖµ:57H + 20H = 77H
µÚ¶þ¸ö×Ö½Ú×îСֵ£º 01H + 20H = 21H, ×î´óÖµ: 5EH + 20H = 7EH
GB2312:ÊÇÒ»ÖÖ±àÂ뷽ʽ£¬ÓÉÓÚ¹ú±êÂëºÍASC£¨00H-80H£©ÂëÖصþ£¬µ¼Ö¼ÆËã»úÎÞ·¨Ê¶±ð£¬Îª½â¾ö´ËÎÊÌ⣬½«¹ú±êÂëµÄÿ¸ö×Ö½Ú×î¸ßλÖÃ1£¬Ê¹µÃÿ¸ö×Ö½Ú´óÓÚ80H£¬´Ó¶øÓëASCÂëÇø·Ö£¬ÕâÑùÓ¢ÎÄ×Ö·ûºÍºº×ÖÔÚͬһ¸öÎļþÖ ......

jsp³£¼û´íÎójava.lang.ClassNotFoundException £­ 500

500´íÎó,classnotfoundÒì³££¬´úÂëûÓÐÎÊÌ⣬Êý¾Ý¿âҲûÎÊÌ⣬´òÁ˲¹¶¡£¬×°ÁËÇý¶¯£¬µ«ÊÇÔÚTOMCATÉÏÕÒ²»µ½ÄǸöÇý¶¯¶øÒý·¢µÄ´íÎ󡣡£¡£
½â¾ö°ì·¨£ºÊ×Ñ¡ÏîÉèÖÃÀMyRclipse->J2EE Project->Web Project->Deployment¹´ÉÏÄÇÈý¸öÇý¶¯¡£ ......

jsp³£¼û´íÎójava.lang.ClassNotFoundException £­ 500

500´íÎó,classnotfoundÒì³££¬´úÂëûÓÐÎÊÌ⣬Êý¾Ý¿âҲûÎÊÌ⣬´òÁ˲¹¶¡£¬×°ÁËÇý¶¯£¬µ«ÊÇÔÚTOMCATÉÏÕÒ²»µ½ÄǸöÇý¶¯¶øÒý·¢µÄ´íÎ󡣡£¡£
½â¾ö°ì·¨£ºÊ×Ñ¡ÏîÉèÖÃÀMyRclipse->J2EE Project->Web Project->Deployment¹´ÉÏÄÇÈý¸öÇý¶¯¡£ ......

Java´íÎó´¦Àí´ó¼¯ºÏ


0¡¢ ÐèÒª±êʶ·û
a) ²»ÔÚº¯ÊýÄÚ
1¡¢ ·Ç·¨±í´ïʽ¿ªÊ¼
b) ¿ÉÄÜ:¶ªÊ§À¨ºÅ .
2. no data found
a) ¿ÉÄÜ:setInt(1,100)ÖÐ,ûÓÐ100Õâ¸öÖµ
3. ÕÒ²»µ½·ûºÅ
a) ¿ÉÄÜ:ûµ¼Èë°ü
4. Ö¸¶¨ÁËÎÞЧURL
a) ¿ÉÄÜ:Êý¾Ý¿âÃû»òIP´íÎó,¼´Á¬½Ó³ö´í
5. Àà·¾¶Ã»ÓÐÕÒµ½
a) ¿ÉÄÜ: ClassNotFoundException: oracle.jdbc.driver.OracleDriver
b) Ô­Òò: Ò»°ãÊÇÖ¸°üÃûд´í,»òÕßûÓÐimport°ü,»òÕßûÓÐÔÚÀà·¾¶ÖÐÕÒµ½jarÎļþ
c) ½â¾ö: ûÓмÓÔØOracleÇý¶¯jar,ÔÚ.bash_profileÖаÑojdbc14.jar¼Ó½øÀ´
6. ¿ÕÖ¸ÕëÒì³£
a) ¿ÉÄÜ: Êý¾ÝÔ´´íÎó ±ÈÈçÊý¾Ý¿âÃû»òIP´íÎó
7. ²»ÄÜÖ´Ðвéѯ
a) ¿ÉÄÜ: Êý¾Ý¿âÖбíµÄÎÊÌâ,±ÈÈçÁÐÃû²»´æÔÚ
8. invalid identity
a) ¿ÉÄÜ: ÁÐÃû³ö´í
9. ÈôÔÚÊý¾Ý¿âÖд´½¨ÁË Á½¸ösequence ,ÔËÐÐʱ³öÏÖÒì³£¿ÉÄÜÊÇÏȺóÖ´ÐÐÁ˶à´ÎselectÓï¾ä,µ¼ÖÂÓëÔ­ÓеÄÐòÁкŲúÉú³åÍ»
10. ±íÃû»òÁÐÃû²»´æÔÚ
a) ¿ÉÄÜ:±í²»´æÔÚ»òÕßûÓвåÈëÊý¾Ýµ½±íÖÐ
11. ²»Ö§³ÖµÄÀà,ÀàµÄ°æ±¾´íÎó
a) ¿ÉÄÜ:ûÓе¼Èëjdk5.0,»òÕß±àÒëÆ÷ÈÔΪ1.4
12. MappingNotFoundException
a) Maybe: In the Eclipse Not refersh , or not exist in the dirctory
13. HibernateException: /hibernate.cfg.xml not found
a ......

javaС¼¼ÇÉ£¨Ò»£©

ÔںܶàÊý¾Ý¿âÖУ¬“ÐÔ±ð”ÕâÒ»×Ö¶ÎÊÇÓÃÓÚintÀàÐÍ´æ´¢µÄ£¬ÈçÓÃ0±íʾ“Å®”£¬1±íʾ“ÄД¡£Ê¹ÓÃResultSet¶ÔÏórs½ÓÊÕ²éѯÊý¾Ý£¬ÔÚ»ñÈ¡Êý¾Ýʱʱ£¬rs.getString()·½·¨ºÍrs.getInt()·½·¨»ñÈ¡µÄÈÔÈ»ÊÇ0(Çø±ðÔÚÓÚStringÀàÐÍ»òÊÇintÀàÐÍ)¡£¶øÔÚʵ¼ÊÓ¦ÓÃʱ£¬ÎÒÃǸüÏ£Íû»ñµÃµÄÊý¾ÝÊÇÖ±¹ÛµØÏÔʾ“ÄД»ò“Å®”£¬ÓÐûÓÐʲô°ì·¨ÄØ£¿
ÓÐÈËÁ¢¿ÌÏë³ö£ºÊ¹ÓÃif-elseÓï¾ä¿ØÖÆ£¬»òÕßʹÓÃÈýÔªÔËËã·û¸³Öµ°¡£¡¿ÉÎÊÌâÓÖ³öÏÖÁË£¬ÕâÑù×öµÄ»°ÎÒÃÇÐèÒª¶¨ÒåÒ»¸ö¶îÍâµÄ±äÁ¿£¬¶øÇÒ¼ÙÈçÎÒÃÇÓжà¸öJSPÒ³ÃæÐèÒªÏÔʾÐÔ±ðµÄʱºòÒª¶àдºÜ¶à¶«Î÷¡£ÄѵÀ¶¨Òå³ÉÒ»¸ö·½·¨£¬Ã¿¸öÒ³Ã涼µ÷Ó÷½·¨ÔÙת»»Âð£¿My God£¡
»¹ÊÇ¿´¿´ÏÂÃæµÄ·½·¨°É¡£
ÔÚʵÌåÀàÖж¨Òå˽ÓÐÊôÐÔ²¢·â×°£º
ĬÈÏ·½·¨£º
package test;
public class User {
private int sex;
public int getSex() {
return sex;
}
public void setSex(int sex) {
this.sex= sex;
}
}

»¹ÊǸÄΪÏÂÃæµÄ·½·¨°É£º
package test;
public class User {
private int sex;
public String getSex() {
if(sex==0){
return "Å®";
}else{
return "ÄÐ";
} ......

Java ¶ÁдExcelÎļþ £¨¶þ£©

JAVA EXCEL API¼ò½é
Java ExcelÊÇÒ»¿ª·ÅÔ´ÂëÏîÄ¿£¬Í¨¹ýËüJava¿ª·¢ÈËÔ±¿ÉÒÔ¶ÁÈ¡ExcelÎļþµÄÄÚÈÝ¡¢´´½¨ÐµÄExcelÎļþ¡¢¸üÐÂÒѾ­´æÔÚµÄExcelÎļþ¡£Ê¹ÓøÃAPI·ÇWindows²Ù×÷ϵͳҲ¿ÉÒÔͨ¹ý´¿JavaÓ¦ÓÃÀ´´¦ÀíExcelÊý¾Ý±í¡£ÒòΪÊÇʹÓÃJava±àдµÄ£¬ËùÒÔÎÒÃÇÔÚWebÓ¦ÓÃÖпÉÒÔͨ¹ýJSP¡¢ServletÀ´µ÷ÓÃAPIʵÏÖ¶ÔExcelÊý¾Ý±íµÄ·ÃÎÊ¡£
ÏÖÔÚ·¢²¼µÄÎȶ¨°æ±¾ÊÇV2.0£¬ÌṩÒÔϹ¦ÄÜ£º
´ÓExcel 95¡¢97¡¢2000µÈ¸ñʽµÄÎļþÖжÁÈ¡Êý¾Ý£»
¶ÁÈ¡Excel¹«Ê½£¨¿ÉÒÔ¶ÁÈ¡Excel 97ÒÔºóµÄ¹«Ê½£©£»
Éú³ÉExcelÊý¾Ý±í£¨¸ñʽΪExcel 97£©£»
Ö§³Ö×ÖÌå¡¢Êý×Ö¡¢ÈÕÆڵĸñʽ»¯£»
Ö§³Öµ¥Ôª¸ñµÄÒõÓ°²Ù×÷£¬ÒÔ¼°ÑÕÉ«²Ù×÷£»
ÐÞ¸ÄÒѾ­´æÔÚµÄÊý¾Ý±í£»
ÏÖÔÚ»¹²»Ö§³ÖÒÔϹ¦ÄÜ£¬µ«²»¾Ã¾Í»áÌṩÁË£º
1. ²»Äܹ»¶Áȡͼ±íÐÅÏ¢£»
2. ¿ÉÒÔ¶Á£¬µ«ÊDz»ÄÜÉú³É¹«Ê½£¬ÈκÎÀàÐ͹«Ê½×îºóµÄ¼ÆËãÖµ¶¼¿ÉÒÔ¶Á³ö£»
Ê×ÏÈÐèÒª´ÓÍøÉÏÏÂÒ»¸ö jexcelapi.zip°ü, ÀïÃæÓÐÎÒÃÇËùÐèÒªµÄjxl.jarÎļþ.
ÏÂÔصØÖ·: http://sourceforge.net/project/showfiles.php?group_id=79926
×Ô¼ºÐ´ÁËÒ»¸ö¼òµ¥µÄÀý×Ó!
WriteExcel.java
import java.io.File;
import java.io.IOException;
import jxl.Workbook;
import jxl.write.Label;
import jxl.writ ......

½âÎöJava¶ÔÏóµÄequals()ºÍhashCode()µÄʹÓÃ

ÔÚJavaÓïÑÔÖУ¬equals()ºÍhashCode()Á½¸öº¯ÊýµÄʹÓÃÊǽôÃÜÅäºÏµÄ£¬ÄãÒªÊÇ×Ô¼ºÉè¼ÆÆäÖÐÒ»¸ö£¬¾ÍÒªÉè¼ÆÁíÍâÒ»¸ö¡£ÔÚ¶àÊýÇé¿ö
Ï£¬ÕâÁ½¸öº¯ÊýÊDz»Óÿ¼Âǵģ¬Ö±½ÓʹÓÃËüÃǵÄĬÈÏÉè¼Æ¾Í¿ÉÒÔÁË¡£µ«ÊÇÔÚһЩÇé¿öÏ£¬ÕâÁ½¸öº¯Êý×îºÃÊÇ×Ô¼ºÉè¼Æ£¬²ÅÄÜÈ·±£Õû¸ö³ÌÐòµÄÕý³£ÔËÐС£×î³£¼ûµÄÊǵ±
Ò»¸ö¶ÔÏó±»¼ÓÈëÊÕ¼¯¶ÔÏó£¨collection
object£©Ê±£¬ÕâÁ½¸öº¯Êý±ØÐë×Ô¼ºÉè¼Æ¡£¸üϸ»¯µÄ¶¨ÒåÊÇ£ºÈç¹ûÄãÏ뽫һ¸ö¶ÔÏóA·ÅÈëÁíÒ»¸öÊÕ¼¯¶ÔÏóBÀ»òÕßʹÓÃÕâ¸ö¶ÔÏóAΪ²éÕÒÒ»¸öÔª¶ÔÏóÔÚÊÕ¼¯¶Ô
ÏóBÀïλÖõÄÔ¿³×£¬²¢Ö§³ÖÊÇ·ñÈÝÄÉ£¬É¾³ýÊÕ¼¯¶ÔÏóBÀïµÄÔª¶ÔÏóÕâÑùµÄ²Ù×÷£¬ÄÇô£¬equals()ºÍhashCode()º¯Êý±ØÐ뿪·¢Õß×Ô¼º¶¨Òå¡£ÆäËûÇé
¿öÏ£¬ÕâÁ½¸öº¯ÊýÊDz»ÐèÒª¶¨ÒåµÄ¡£
equals():
ËüÊÇÓÃÓÚ½øÐÐÁ½¸ö¶ÔÏóµÄ±È½ÏµÄ£¬ÊǶÔÏóÄÚÈݵıȽϣ¬µ±È»Ò²ÄÜÓÃÓÚ½øÐжÔÏó²ÎÔÄÖµµÄ±È½Ï¡£Ê²Ã´ÊǶÔÏó²ÎÔÄÖµµÄ±È½Ï£¿¾ÍÊÇÁ½¸ö²ÎÔıäÁ¿µÄÖµµÃ±È½Ï£¬ÎÒÃÇ
¶¼ÖªµÀ²ÎÔıäÁ¿µÄÖµÆäʵ¾ÍÊÇÒ»¸öÊý×Ö£¬Õâ¸öÊý×Ö¿ÉÒÔ¿´³ÉÊǼø±ð²»Í¬¶ÔÏóµÄ´úºÅ¡£Á½¸ö¶ÔÏó²ÎÔÄÖµµÄ±È½Ï£¬¾ÍÊÇÁ½¸öÊý×ֵıȽϣ¬Á½¸ö´úºÅµÄ±È½Ï¡£ÕâÖֱȽÏÊÇĬ
ÈϵĶÔÏó±È½Ï·½Ê½£¬ÔÚObjectÕâ¸ö¶ÔÏóÖУ¬ÕâÖÖ·½Ê½¾ÍÒѾ­Éè¼ÆºÃÁË¡£ËùÒÔÄãÒ²²»ÓÃ×Ô¼ºÀ´ÖØд£¬À˷Ѳ»±ØÒªµÄʱ¼ä¡£
¶Ô ......
×ܼǼÊý:6386; ×ÜÒ³Êý:1065; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [1054] [1055] [1056] [1057] 1058 [1059] [1060] [1061] [1062] [1063]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ