可以的啊。。
servele
action都有这种传法啊。
servele
action都有这种传法啊。
解决方案 »
- 刚刚接触XMPP协议,想做一个即时通信程序
- 《spring 2.0 技术手册》配套光盘谁有?
- JSP运行平台(Tomcat+J2SDK)的Tomcat配置问题
- 有關Hibernate的一個小問題?
- 关于页面处理的问题。大家请进来帮帮我~~
- mysql数据库驱动问题(在线等!!!)
- Eclipse中使用VSS插件的问题,请教高手!!!
- 这样 得到 系统的 当前年, 月 ,日?100相送!
- 请教:关于英文,简体中文,繁体中文在JSP/JAVA中的整体解决方案!!!!!
- 请教各位高手,如何编写分页程序?数据库连结ORALCE 8I。
- 怪事,今天做了个测验,我把sqlserver2000三个驱动库(*.jar)全部改名,我的系统仍然能够访问数据库!这是为什么啊?
- 如何判断出字符集?
parseInt
public static int parseInt(String s)
throws NumberFormatException
Parses the string argument as a signed decimal integer. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' ('\u002D') to indicate a negative value. The resulting integer value is returned, exactly as if the argument and the radix 10 were given as arguments to the parseInt(java.lang.String, int) method. Parameters:
s - a String containing the int representation to be parsed
Returns:
the integer value represented by the argument in decimal.
Throws:
NumberFormatException - if the string does not contain a parsable integer.parseFloat
public static float parseFloat(String s)
throws NumberFormatException
Returns a new float initialized to the value represented by the specified String, as performed by the valueOf method of class Float. Parameters:
s - the string to be parsed.
Returns:
the float value represented by the string argument.
Throws:
NumberFormatException - if the string does not contain a parsable float.
Since:
1.2
See Also:
valueOf(String)parseDouble
public static double parseDouble(String s)
throws NumberFormatException
Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double. Parameters:
s - the string to be parsed.
Returns:
the double value represented by the string argument.
Throws:
NumberFormatException - if the string does not contain a parsable double.
Since:
1.2
See Also:
valueOf(String)parseLong
public static long parseLong(String s)
throws NumberFormatException
Parses the string argument as a signed decimal long. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' (\u002D') to indicate a negative value. The resulting long value is returned, exactly as if the argument and the radix 10 were given as arguments to the parseLong(java.lang.String, int) method.
Note that neither the character L ('\u004C') nor l ('\u006C') is permitted to appear at the end of the string as a type indicator, as would be permitted in Java programming language source code.
Parameters:
s - a String containing the long representation to be parsed
Returns:
the long represented by the argument in decimal.
Throws:
NumberFormatException - if the string does not contain a parsable long.
<%
String date_end="2003-01-02";
java.sql.Date myDateEnd=java.sql.Date.valueOf(date_end);
Date now=new Date();out.println("时间:"+now.getYear()+"-"+now.getMonth()+"-"+now.getDate()+" "+now.getDay()+" "+now.getHours()+":"+now.getMinutes()+":"+now.getSeconds()); var time_now=new Date();
var hours_now=time_now.getHours();
var minutes_now=time_now.getMinutes();
var seconds_now=time_now.getSeconds();
var year_now=time_now.getYear();
var month_now=time_now.getMonth();
var date_now=time_now.getDate();
var day_now=time_now.getDay();DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date date = (Date)formatter.parse("2000-11-23");
new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
strOut = dft.format(date);Date now=new Date();
int year=now.getYear()+1900;
out.println("时间:"+year+"-"+now.getMonth()+"-"+now.getDate()+" "+now.getDay()+" "+now.getHours()+":"+now.getMinutes()+":"+now.getSeconds());