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 "ÄÐ";
}
}
public void setSex(int sex) {
this.sex = sex;
}
}
´ó¼ÒÓ¦¸Ã¶¼¿´Ã÷°×ÁË£¬Ö»Êǽ«sexµÄgetSex()·½·¨µÄ·µ»ØÀàÐ͸ÄΪStringÀàÐÍ£¬²¢ÇÒÔÚ·½·¨ÖÐ×öÁ˼òµ¥µÄ¸³Öµ£¬ÎÒÃǵÄÄ¿µÄ¾ÍʵÏÖÁË£¡
×ö¸ö¼òµ¥µÄ²âÊÔ°É£º
package test;
public class Test {
public static void main(String[] args) {
User user=new User();
user.setSex(0);
System.out.println(user.getSex());
}
}
Êä³ö½á¹û¾ÍÊǓŮ”À²£¬Èç¹ûsetSex(1)µÄ»°£¬Êä³ö×ÔÈ»ÊÇ“ÄД¿©£¡
µ±È»£¬ÎªÁ˳ÌÐòµÄÑÏÃÜÐÔ£¬»¹ÊÇÓ¦¸Ã½«·½·¨Ð´µÄ¸üϸÖÂһЩ£º
package test;
public class User {
private int sex;
public String getSex() {
if(sex==0){
return "Å®";
}else if(sex==1){
ret
Ïà¹ØÎĵµ£º
Java Web Start ÊÇÒ»¸öhelperÓ¦ÓóÌÐò£¬ËüºÍWEBä¯ÀÀÆ÷¹ØÁªÔÚÒ»Æð¡£µ±Óû§µã»÷Ö¸ÏòÒ»¸öÌØ¶¨µÄlaunchÎļþ(JNLPÎļþ)ʱ£¬»á´Ùʹä¯ÀÀÆ÷×°ÔØJava Web Start, JAWSÈ»ºó×Ô¶¯ÏÂÔØ¡¢»º³å¡¢ÔËÐиø¶¨µÄ»ùÓÚJAVA¼¼ÊõµÄÓ¦ÓóÌÐò¡£Õû¸ö¹ý³ÌÎÞÐèºÍÓû§½øÐн»»¥¡£
JNLP URLsÒ²¿ÉÒÔ´ÓJAWSÓ¦ÓóÌÐò¹ÜÀíÖ±½Ó´ò¿ª²¢ÇÒÄÜÖÆ³ÉÊéÇ©,´ËÍ⣠......
javaÓëdot netÈËÔ±Ôõô²ÅÄÜתÐÐ×öǶÈëʽ¿ª·¢£¿
´ó¼Ò¶¼ÖªµÀ£¬Ç¶ÈëʽÊǵ±Ç°×î»ð¡¢×îÓÐǰ¾°µÄÒ»¸öÐÐÒµ£¬Æäְҵǰ¾°ÓëÖ°Òµ´ýÓöÓëjavaºÍnet¿ª·¢Ïà±È£¬Ó¦¸ÃÊÇÓÅÊÆÒ»´ó½Ø£¬¶ÔÓÚÄÇЩÕý´ÓÊÂjavaÒÔ¼°.net¿ª·¢µÄÈËÔ±À´Ëµ£¬ÈçºÎ²ÅÄÜÓÐЧתµ½Ç¶Èëʽ¿ª·¢µÄÐÐÒµÖÐÀ´ÄØ£¿
ҪתÈ뵽ǶÈëʽ¿ª·¢ÐÐÒµ£¬ÎãÓ¹ÖÃÒɵÄÒ»µãÊDZØÐëÕÆ ......
JSPÔ´´úÂë
<%
//»ñȡϵͳʱ¼ä
//String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());
TimeZone tz = TimeZone.getTimeZone("ETC/GMT-8");
TimeZone.setDefault(tz);
  ......
ת£º http://hi.baidu.com/jiong0818/blog/item/93f9b21641294b4d20a4e971.html JavaÖÐÈÕÆÚ¸ñʽת»» /** * ×Ö·û´®×ª»»Îªjava.util.Date
* Ö§³Ö¸ñʽΪ yyyy.MM.dd G 'at' hh:mm:ss z Èç '2002-1-1 AD at 22:10:59 PSD'
* yy/MM/dd HH:mm:ss Èç '2002/1/1 17:55:00'
* yy/MM/dd HH:mm:ss pm Èç '2002/1/1 17:55:00 p ......
500´íÎó,classnotfoundÒì³££¬´úÂëûÓÐÎÊÌ⣬Êý¾Ý¿âҲûÎÊÌ⣬´òÁ˲¹¶¡£¬×°ÁËÇý¶¯£¬µ«ÊÇÔÚTOMCATÉÏÕÒ²»µ½ÄǸöÇý¶¯¶øÒý·¢µÄ´íÎ󡣡£¡£
½â¾ö°ì·¨£ºÊ×Ñ¡ÏîÉèÖÃÀMyRclipse->J2EE Project->Web Project->Deployment¹´ÉÏÄÇÈý¸öÇý¶¯¡£ ......