Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javaÊý¾ÝÀàÐÍת»»

1ÈçºÎ½«×Ö´® String ת»»³ÉÕûÊý int?
A. ÓÐÁ½¸ö·½·¨:
1). int i = Integer.parseInt([String]); »ò
i = Integer.parseInt([String],[int radix]);
2). int i = Integer.valueOf(my_str).intValue();
×¢: ×Ö´®×ª³É Double, Float, Long µÄ·½·¨´óͬСÒì.
2 ÈçºÎ½«ÕûÊý int ת»»³É×Ö´® String ?
A. ÓÐÈþÖÖ·½·¨:
1.) String s = String.valueOf(i);
2.) String s = Integer.toString(i);
3.) String s = "" + i;
×¢: Double, Float, Long ת³É×Ö´®µÄ·½·¨´óͬСÒì.
JAVAÊý¾ÝÀàÐÍת»»  
¹Ø¼ü×Ö   ÀàÐÍת»»
³ö´¦   
ÕâÊÇÒ»¸öÀý×Ó,˵µÄÊÇJAVAÖÐÊý¾ÝÊýÐ͵Äת»».¹©´ó¼ÒѧϰÒý
package cn.com.lwkj.erts.register;
import java.sql.Date;
public class TypeChange {
  public TypeChange() {
  }
  //change the string type to the int type
  public static  int stringToInt(String intstr)
  {
    Integer integer;
    integer = Integer.valueOf(intstr);
    return integer.intValue();
  }
  //change int type to the string type
  public static String intToString(int value)
  {
    Integer integer = new Integer(value);
    return integer.toString();
  }
  //change the string type to the float type
  public static  float stringToFloat(String floatstr)
  {
    Float floatee;
    floatee = Float.valueOf(floatstr);
    return floatee.floatValue();
  }
  //change the float type to the string type
  public static String floatToString(float value)
  {
    Float floatee = new Float(value);
    return floatee.toString();
  }
  //change the string type to the sqlDate type
  public static java.sql.Date stringToDate(String dateStr)
  {
    return  java.sq


Ïà¹ØÎĵµ£º

javaÊý¾Ý¿âµÈ——ÂÒÂëÎÊÌâ½â¾ö°ì·¨

ÖÐÎÄÂÒÂë½â¾ö·½°¸£º
Êý¾Ý¿âÂÒÂë:
UTF-8¶ÔÖÐÎÄÓÃ3¸ö×Ö½ÚÀ´±íʾ
String s =”·ÉÏè”;
byte[] utf8 = s.getBytes(“utf-8”);//»ñµÃutf-8±àÂëµÄ×Ö½ÚÖµ
System….(new String(utf8,”gbk”);//ÓÃGBK±àÂë¸ñʽ¶ÔUTF-8±àÂë¸ñʽµÄ×Ö½ÚÊý×é½øÐнâÂ룬½«²úÉúÂÒÂë¡£
 
²é¿´Êý¾Ý¿âµÄ× ......

12.18 javaÖеÄview£¬ibatis dao

JavaÄÚ²¿À൱³õµÄÉè¼ÆÄ¿µÄÓ¦¸ÃÊÇʵÏÖ¶àÖؼ̳У¬ºóÀ´·¢ÏÖÄÚ²¿À໹´øÀ´ÁËÆäËûºÃ´¦£¬Èç¿ÉÒÔʹÓÃÄÚ²¿Àà°üװһЩº¯Êý£¬ÊµÏÖº¯Êý¼¶±ðµÄȨÏÞ¿ØÖƵȡ£
     JavaÖУ¬LIst.subList()µÈ·½·¨²úÉúµÄÊÇÒ»¸öview£¬¼´²»ÊÇ´«Öµ£¬¶ø½öÊÇÒýÓá£ËƺõÔÚjavaÖгýÁËprimitiveÀ࣬ÆäËûÀ඼Ðènew²ÅÄܲúÉúжÔÏó¡£
iBatis DAO¿ò¼ÜÍ ......

żÏñ³ç°Ý——¡¶JavaҹδÃß¡·½ÚÑ¡

żÏñ³ç°Ý£¨Ò»£©
ÄãµÄżÏñÊÇË­£¿ÔÚ¸ßÖÐʱ´ú£¬ÎÒµÄżÏñÊÇÊãÇéÀËÂþ¡¢¸ß¿º¼¤°ºµÄ¿ÕÖв¹¸ø£¨Air Supply£©ÒÔ¼°¾²Èç´¦×Ó¡¢¶¯ÈçÍÑÍõĿ­Àò·Ã×Â壨Kylie Minogue£©£»ÏÖÔÚÎÒµÄżÏñÊÇDavid Flanagan¡¢Jonathan Knudsen¡¢Elliotte Rusty Harold¡¢Bruce EckelµÈÈË¡£ÄãÎÊÎÒDavid FlanaganµÈÈ˳ª¹ýʲô¸è£¬à¸£¡ÄãÎó»áÁË£¬ËûÃDz» ......

JAVA ¶¨Ê±Æ÷µÄʹÓà ~ תÔØ1

¶¨Ê±Æ÷ÀàTimerÔÚjava.util°üÖС£Ê¹ÓÃʱ£¬ÏÈʵÀý»¯£¬È»ºóʹÓÃʵÀýµÄschedule(TimerTask task, long delay)·½·¨£¬É趨ָ¶¨µÄÈÎÎñtaskÔÚÖ¸¶¨µÄÑÓ³ÙdelayºóÖ´ÐС£¶¨Ê±Æ÷ÈÎÎñÀàTimerTaskÊdzéÏóÀ࣬¼Ì³Ð²¢ÖØдÆärun()·½·¨£¬¿ÉʵÏÖ¾ßÌåÈÎÎñ¡£
schedule(TimerTask task, Date time)É趨ָ¶¨ÈÎÎñtaskÔÚÖ¸¶¨Ê±¼ätimeÖ´ÐС£
cancel() ......

Ò»µÀÈÝÒ׳ö´íµÄjava±ÊÊÔÌâ

ÔÚcsdnÉÏ¿´µ½ÕâÑùÒ»¸öÌâÄ¿£º
public class Test
{
public static void main(String[] args)
{
int a = 5;
System.out.println("ddsadasa" + (a > 5 ? 9.0 : 9));
}

ÔËÐнá¹ûÊÇ£¨ £© 
A ddsadasa9    B ddsadasa9.0    C  ±àÒë³ö´í  & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ