Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÓʼþȺ·¢Æ÷

JavaÓʼþȺ·¢Æ÷
 ¹¦ÄÜ˵Ã÷£º
  1¡¢ÅúÁ¿Ñ­»··¢ËÍÓʼþ
  2¡¢·¢ËÍHTMLÎļþ£¬´ý·¢Ë͵ÄÓʼþÒÔhtmµÄ¸ñʽ´æ·Å£¬¿ÉÒÔÊÇÍøÂçÉϵÄhtmÎļþ£¬¿ÉÒÔÊDZ¾µØµÄhtmÎļþ
  3¡¢¿ÉÒÔÖ¸¶¨·¢Ë͸½¼þµÄĿ¼£¬ÏµÍ³»á¼ÓÔØÖ¸¶¨Ä¿Â¼µÄÈ«²¿¸½¼þÒ»Æð·¢ËÍ
  4¡¢·¢ËÍÓʼþÒÔtxtÎļþ±£´æ£¬Ã¿Ðб£´æÒ»¸öÓʼþ ......

JavaÖÐ ObjectµÄ·½·¨


¹¹Ôì·½·¨ÕªÒª
Object()
           
·½·¨ÕªÒª
protected Object clone()
           ´´½¨²¢·µ»Ø´Ë¶ÔÏóµÄÒ»¸ö¸±±¾¡£
boolean equals(Object obj)
       &n ......

ÈçºÎ½â¾öJava WEBÓ¦ÓÃÖеÄÂÒÂëÎÊÌâ


±¾×÷Æ·²ÉÓÃ֪ʶ¹²ÏíÊðÃû-·ÇÉÌÒµÐÔʹÓÃ-Ïàͬ·½Ê½¹²Ïí 2.5 Öйú´ó½Ðí¿ÉЭÒé½øÐÐÐí¿É¡£
µ±ÎÒÃÇͨ¹ýJava³ÌÐòÔ±µÄÊÓ½ÇÀ´ä¯ÀÀÍøҳʱ»á·¢ÏÖ£ºÒ»·½ÃæÓû§¶Ëä¯ÀÀÆ÷£¨IE»òFirefox£©ÒÔ±íµ¥»òÁ´½ÓµÄ·½Ê½Ìá½»HTTPÇëÇóͬʱÓÖ´¦ÀíHTTP·þÎñÆ÷·¢³öµÄÏìÓ¦Êý¾Ý£¬½«ÆäÖеÄÊý¾ÝÁ÷£¨HTMLÊý¾Ý»òÆäËüÖÖÀàµÄÊý¾Ý£©ÒÔÊʵ±µÄ·½Ê½Õ¹Ê¾¸øʹÓÃÕßä¯ÀÀ¡ ......

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ºÅ