java »ù´¡
1 import
2 package
3 ÐÞÊηû
4 ³éÏóÀà ½Ó¿Ú
5 static
6 StringÏà¹Ø
7 javadoc
8 Òì³£
9 ÈÕÆÚÏà¹Ø
10 ÊäÈëÊä³öÁ÷
11
Ò» import
importÓÃÓÚµ¼È벻ͬ°üÖеÄÀ࣬²»Í¬°üÖеÄÀàÃû¿ÉÒÔÏàͬ¡£
ÓÃ*ºÅÖ»Äܵ¼ÈëÒ»¸ö°ü£¬²»ÄÜʹÓà import java.* »òÕß java.*.*ÀàËƵĵ¼Èë¶à¸ö°ü¡£
µ¼ÈëµÄ²»Í¬µÄ°ü£¬º¬ÓÐÏàͬµÄÀàÃûʱ£¬»á±àÒë´íÎ󣬴ËʱÐèÒªÓðüÃûºÍÀàÃû½áºÏµÄ·½Ê½Î¨Ò»Ö¸¶¨Ò»¸öÀà¡£ÔÚc++ÖУ¬Óë°üÃûÀàËƵÄÊÇ
namespace¡£using namespace std; import ****;
import ºÍincludeµÄÇø±ð£º
javaÖпÉÒÔͨ¹ýÔÚÀàÃûÇ°¼Ó°üÃû£¬±ÜÃâʹÓÃimport ¶øc++ÖеÄ#include°ÑÍⲿÎļþ¼ÓÔؽøÀ´£¬ÔÚ±àÒëµÄʱºò
¶þ package
package ÓÃÓÚÖ¸¶¨½«Àà·ÅÔÚÖ¸¶¨µÄ°üÖС£Èç package com.csdn.code ÔòÀàÔÚ°ü com.csdn.code °üÏ¡£
ÈôÊÇÒ»¸öÀàδָ¶¨public ºÍ private£¬ÔòÀàµÄ×÷ÓÃÓòÊÇ°ü¿É¼û¡£
Èý ÐÞÊηû
private public protected.
1¡¢public£ºÊý¾Ý³ÉÔ±¡¢³ÉÔ±º¯Êý ¶ÔËùÓÐÓû§¿ª·ÅµÄ£¬ËùÓÐÓû§¶¼¿ÉÒÔÖ±½Ó½øÐе÷ÓÃ
2¡¢private£ºÊdzýÁËclass×Ô¼ºÖ®Í⣬ÈκÎÈ˶¼²»¿ÉÒÔÖ±½ÓʹÓÃ
3¡¢protected£º¶Ô×ÓÀà»òͬ°üµÄÀà¿É¼û¡£ÆäËû²»¿É¼û
×÷ÓÃÓò µ±Ç°Àà ͬһpackage ×ÓËïÀà ÆäËûpackage
public √ √ √ √
protected
Ïà¹ØÎĵµ£º
Struts¡¢HibernateºÍSpringµÄÇáÐÍJ2EE¼Ü¹¹µÄÑо¿
¹Ø¼ü´Ê Struts£¬Hibernate£¬Spring£¬Óû§¹ÜÀí
Ò»¡¢ÌØÐÔ
1. StrutsÓëMVC
StrutsÊÇApache JakartaÏîÄ¿µÄ×é³É²¿·Ö¡£¸ÃÏîÄ¿µÄÄ¿±êÊÇΪ½¨Á¢Java Web Ó¦ÓóÌÐò¶øÌṩµÄÒ»¸ö¿ªÔ´
¿ò¼Ü¡£Í¨¹ýʹÓÃStruts¿ò¼Ü¿ÉÒԸĽøºÍÌá¸ßJava Server Pages (JSP ......
JavaÖжÑÕ»µÄ¸ÅÄȻÊÇÂß¼Éϵģ¬ÔÚÍêÈ«·ûºÏJava¹æ·¶µÄJava´¦ÀíÆ÷ÃæÊÀ֮ǰ£¬ËùÓÐJavaÐéÄâ»úÌṩµÄÄÚÈݶ¼ÊÇÓÉÈí¼þÄ£Äâ³öÀ´µÄ¡£
ʲô½Ð¶Ñ£¿ÄãÓÃÊ®¼¸¸öÂ齫ÅÆÊúÖ±µþ³ÉÒ»ÞûÕâ½Ð¶Ñ£¬Äã¿ÉÒÔ´ÓÉÏÃæ¡¢ÏÂÃæ¡¢ÖмäÈÎÒâ³é³öÒ»ÕÅÅÆ£¬Ò²¿ÉÒÔÈÎÒâ²åÈëÒ»ÕÅ¡£
ʲô½ÐÕ»£¿AK-47µÄµ¯Ï»¾ÍÊÇÒ»¸öÕ»£¬ÔÚÉÏÃæµÄ×Óµ¯Ã»±»È¡³ö֮ǰ£¬ÄãÎÞ·¨È¡³öÏÂà ......
public class Multiplication
{
public static void main(String[] args)
{
// TODO Auto-generated method stub
for(int i = 1; i < 10; i+ ......
·þÎñÆ÷¶Ë:
package com.huahua;
import java.io.BufferedOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
public class ServerThread extends Thread {
......
ÍøÕ¾ÁбíÈçÏ£º
IBMÖйúµÄ¿ª·¢ÕßÍøÕ¾£ºhttp://www.ibm.com/developerworks/cn/
IBMÖйúfor javaµÄ¿ª·¢ÕßÍøÕ¾£ºhttp://www.ibm.com/developerworks/cn/java/ ÖÐÎÄ
IBMÖйúfor javaµÄ¿ª·¢ÕßÍøÕ¾£ºhttp://www.ibm.com/developerworks/java Ó¢ÎÄ
Google´úÂëĿ¼ÍøÕ¾£ºhttp://c ......