JavaÖÐstaticÓ÷¨
ת×Ô
http://blog.pfan.cn/sword2008/13772.html
Ò»¡¢static
¡¡¡¡ÇëÏÈ¿´ÏÂÃæÕâ¶Î³ÌÐò£º
public class Hello{
public static void main(String[] args){
//(1)
System.out.println("Hello,world!"); //(2)
}
}
¡¡¡¡¿´¹ýÕâ¶Î³ÌÐò£¬¶ÔÓÚ´ó¶àÊýѧ¹ýJava
µÄ´ÓÀ´Ëµ£¬¶¼²»Ä°Éú¡£¼´Ê¹Ã»ÓÐѧ¹ýJava£¬¶øѧ¹ýÆäËüµÄ¸ß¼¶ÓïÑÔ£¬ÀýÈçC£¬ÄÇÄãÒ²Ó¦¸ÃÄÜ¿´¶®Õâ¶Î´úÂëµÄÒâ˼¡£ËüÖ»ÊǼòµ¥µÄÊä³ö“Hello,world”£¬Ò»µã±ðµÄÓô¦¶¼Ã»ÓУ¬È»¶ø£¬ËüȴչʾÁËstatic¹Ø¼ü×ÖµÄÖ÷ÒªÓ÷¨¡£
¡¡¡¡ÔÚ1´¦£¬ÎÒÃǶ¨ÒåÁËÒ»¸ö¾²Ì¬µÄ·½·¨ÃûΪmain£¬Õâ¾ÍÒâζןæËßJava±àÒëÆ÷£¬ÎÒÕâ¸ö·½·¨²»ÐèÒª´´½¨Ò»¸ö´ËÀàµÄ¶ÔÏó¼´¿ÉʹÓá£Ä㻹¼ÇµÃÄãÊÇÔõôÔËÐÐÕâ¸ö³ÌÐòÂð£¿Ò»°ã£¬ÎÒÃǶ¼ÊÇÔÚÃüÁîÐÐÏ£¬´òÈëÈçϵÄÃüÁ
javac Hello.java
java Hello
Hello,world!
¡¡¡¡Õâ¾ÍÊÇÄãÔËÐеĹý³Ì£¬µÚÒ»ÐÐÓÃÀ´±àÒëHello.javaÕâ¸öÎļþ£¬Ö´ÐÐÍêºó£¬Èç¹ûÄã²é¿´µ±Ç°£¬»á·¢ÏÖ¶àÁËÒ»¸öHello.classÎļþ£¬ÄǾÍÊǵÚÒ»ÐвúÉúµÄJava¶þ½øÖÆ×Ö½ÚÂë¡£µÚ¶þÐоÍÊÇÖ´ÐÐÒ»¸öJava³ÌÐòµÄ×îÆÕ±é×ö·¨¡£Ö´Ðнá¹ûÈçÄãËùÁÏ¡£ÔÚ2ÖУ¬Äã¿ÉÄÜ»áÏ룬ΪʲôҪÕâÑù²ÅÄÜÊä³ö¡£ºÃ£¬ÎÒÃÇÀ´·Ö½âÒ»ÏÂÕâÌõÓï¾ä¡££¨Èç¹ûûÓа²×°JavaÎĵµ£¬Çëµ½SunµÄ¹Ù·½ÍøÕ¾ä¯ÀÀJ2SE
API£©Ê×ÏÈ£¬SystemÊÇλÓÚjava.lang°üÖеÄÒ»¸öºËÐÄÀ࣬Èç¹ûÄã²é¿´ËüµÄ¶¨Ò壬Äã»á·¢ÏÖÓÐÕâÑùÒ»ÐУºpublic static final
PrintStream
out;½Ó×ÅÔÙ½øÒ»²½£¬µã»÷PrintStreamÕâ¸ö³¬Á´½Ó£¬ÔÚMETHODÒ³Ã棬Äã»á¿´µ½´óÁ¿¶¨ÒåµÄ·½·¨£¬²éÕÒprintln£¬»áÓÐÕâÑùÒ»ÐУº
public void println(String x)¡£
¡¡¡¡ºÃÁË£¬ÏÖÔÚÄãÓ¦¸ÃÃ÷°×ΪʲôÎÒÃÇÒªÄÇÑùµ÷ÓÃÁË£¬outÊÇSystemµÄÒ»¸ö¾²Ì¬±äÁ¿£¬ËùÒÔ¿ÉÒÔÖ±½ÓʹÓ㬶øoutËùÊôµÄÀàÓÐÒ»¸öprintln·½·¨¡£
¾²Ì¬·½·¨
¡¡¡¡Í¨³££¬ÔÚÒ»¸öÀàÖж¨ÒåÒ»¸ö·½·¨Îªstatic£¬ÄǾÍÊÇ˵£¬ÓÃÀàÃû¶øÎÞÐè±¾ÀàµÄ¶ÔÏ󼴿ɵ÷Óô˷½·¨¡£ÈçÏÂËùʾ£º
class Simple{
static void go(){
System.out.println("Go...");
}
}
public class Cal{
public
static void main(String[] args){
Simple.go();
}
}
¡¡¡¡µ÷ÓÃÒ»¸ö¾²Ì¬·½·¨¾ÍÊÇ“ÀàÃû.·½·¨Ãû”,¾²Ì¬·½·¨µÄʹÓúܼòµ¥ÈçÉÏËùʾ¡£Ò»°ãÀ´Ëµ£¬¾²Ì¬·½·¨³£³£ÎªÓ¦ÓóÌÐòÖеÄÆäËüÀ
Ïà¹ØÎĵµ£º
ת×Ô:http://hi.baidu.com/%C9%AE_%CC%C6/blog/item/9e2a8b0887008a8ad0581b3d.html
¼ò»¯Í¼£º
Javaƽ̨ÌṩÁËÒ»¸öȫеļ¯ºÏ¿ò¼Ü¡£“¼¯ºÏ¿ò¼Ü”Ö÷ÒªÓÉÒ»×éÓÃÀ´²Ù×÷¶ÔÏóµÄ½Ó¿Ú×é³É¡£²»Í¬½Ó¿ÚÃèÊöÒ»×鲻ͬÊý¾ÝÀàÐÍ¡£
Java 2¼¯ºÏ¿ò¼Üͼ
¼¯ºÏ½Ó¿Ú£º6¸ö½Ó¿Ú£¨¶ÌÐéÏß±íʾ£©£¬±íʾ²»Í¬¼¯ºÏÀàÐÍ£¬ÊǼ¯ºÏ¿ò¼Üµ ......
¾àÀëJava7µÄMR°æ±¾·¢²¼ÓжÎʱ¼äÁË£¬Í¨¹ý°²×°ÊÔÓÃÖ®ºóµÄ×ÜÌå¸Ð¾õÊÇ£ºËÙ¶ÈÓÖ¿ìÁË¡£×ÐϸÔĶÁÁËJava7µÄÏà¹ØÎĵµ·¢ÏÖ£¬Java7ÓµÓÐÈçϵÄһЩеÄÌØÐÔ¡£
Ê×ÏÈÊÇÄ£¿é»¯ÌØÐÔ£¬Èç¹ûÄú°²×°ºÍʹÓùýNetBeans6.7µÄ»°£¬ÊDz»ÊÇ»áÓÐÒ»¸öºÜ´óµÄ¸Ð¾õ£¬¾ÍÊÇNetBeans6.7µÄÆô¶¯ËٶȱÈÒÔÇ°¿ìÁ˺ܶ࣬µ±È»²¢²»ÊÇNetBeansÒѾʹ ......
String keyword = request.getParameter("keyword");
String timeRange = request.getParameter("timeRange");
String type = request.getParameter("type");
StringBuffer sql = new StringBuffer();
sql.append("use webstation_leadall s ......
1.¸ÅÊö
JSPÊÇÒ»ÖÖʵÏÖÆÕͨ¾²Ì¬HTMLºÍ¶¯Ì¬HTML»ìºÏ±àÂëµÄ¼¼Êõ¡£
JSP×îÖջᱻת»»³É±ê×¼µÄServlet£¡£¡£¡
JSPÉè¼ÆµÄÄ¿µÄÔÚÓÚ¼ò»¯±íʾ²ãµÄ±íʾ¡£
JSPÒ³ÃæµÄÆäËû³É·ÖÖ÷ÒªÓÐÈçÏÂÈýÖÖ£º
½Å±¾ÔªËØ
Ö¸Áî
¶¯×÷
ÀýÈ磺
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*& ......