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

´ÓC++µ½JavaµÄ×¢Òâµã£¨ÉÏ£©

   1.JavaµÄ±àÒëÔËÐР
       JavaÖеÄpackage¸ÅÄîÏ൱ÓÚC++ÖеÄnamespaceµÄ¸ÅÄî¡£µ«ÊÇjava»á°ÑpackageµÄÃû×ÖºÍÎļþϵͳÖÐĿ¼½á¹¹¶ÔÓ¦ÆðÀ´£¬Ò²¼´Èç¹ûÄãÉêÃ÷ÁËij¸öpackageµÄÃû×ÖΪcom.tij.everythingisobj£¬ÄÇôÄãµÄÎļþϵͳÖбØÐë´´½¨com\tij\everythingisobjÕâÑùÒ»¸öĿ¼½á¹¹£¬ËùÓÐÊôÓÚÕâ¸öpackageµÄjavaÔ´´úÂ붼»á·ÅÔÚÕâ¸öĿ¼Ï£¡Ö®ËùÒÔÒªÕâô×ö£¬ÊÇΪÁËjvm¼ÓÔØÔËÐÐjava´úÂë·½±ã£¬¿ÉÒÔ¸ù¾Ýpackage²¢½áºÏCLASSPATHÀ´×°ÔØ*.java±àÒëºóµÄ*.classÔÚʲôλÖá£
ÀýÈçEveryObject .java£º
package com.tij.everythingisobj;
public class EveryObject {
 public static void main(String[] args) {
 }
}
javac  com\tij\everythingisobj\EveryObject.java
 Ê×ÏÈÓÃjavacÀ´±àÒë*.javaÎļþ£¬Éú³É*.class¡£¿ÉÒÔ°ÑÕâЩ*.class´ò°ü³ÉÒ»¸öjar°ü£¬µ«±ØÐë±£ÁôÍê³ÉµÄ·¾¶Ãû³Æ¡£
java com.tij.everythingisobj.EveryObject
Éú³É*.classºó£¬¿ÉÒÔÓÃÔÚÃüÁîÐÐÖÐÓÃjavaÃüÁî¸æËßjvmҪװÔØÄĸöÀಢÔËÐУ¬´Ëʱjvm»á¸ù¾ÝCLASSPATHÖÐÉèÖõÄ·¾¶È¥ËÑË÷ÄãÒªÔËÐеÄÀà¡£Èç¹ûÄãµÄCLASSPATHΪ c:\; ./£¬ÄÇôjvm»áÔÚ c:\com/tij/everythingisobjºÍ./com/tij/everythingisobjĿ¼ÏÂËÑË÷EveryObjectÀ࣬²¢×°ÔØËüµÄ¾²Ì¬mainº¯ÊýÔËÐС£ÄãÒ²¿ÉÒÔÔÚjavaÃüÁîÖмÓÈë -cpÀ´Ö¸¶¨CLASSPATH.
java -cp ./everyobj.jar  com.tij.everythingisobj.EveryObject
Èç¹ûÄãÒªÔËÐÐ*.jarÎļþ£¬ÄÇô±ØÐë°ÑÄãµÄ*.jarÎļþ°üÀ¨ÔÚ -cpÑ¡ÏîÖС£´ò¿ª*.jarÄã¿ÉÒÔ¿´µ½ÀïÃæÒ²ÊÇÍêÕûµÄ·¾¶Ãû£¬Ä¿Â¼Î÷Ã涼ÊÇ*.class¡£¸úÖ±½Ó·ÅÔÚÎļþϵͳÉÏÖ´ÐÐÊÇÀàËƵġ£
2.JavaµÄpackage
   ËùÓÐ*.java¶¼ÒªÊôÓÚijһ¸öpackage£¬Ò»¸öpackage¿ÉÒÔÓµÓÐn¸ö .javaÎļþ£¬Ã¿¸ö.javaÎļþÖÐÖ»ÄÜÓÐÒ»¸öpublicµÄÀà¡£¶øÇÒÕâ¸öÀàÃû±ØÐëÓë.javaµÄÃû×ÖÒ»Ñù¡£Í¬Ò»¸öpackageµÄ *.javaÎļþ¶¼»á·ÅÔÚÎļþϵͳµÄͬһ¸öĿ¼ÏÂÃæ¡£Èç¹ûÔÚ*.javaÖÐûÓÐÖ¸¶¨package name£¬ÄÇô*.javaÊôÓÚËüËùÔÚĿ¼µÄĬÈϵÄpackage£¬Ò»°ã²»ÓÃĬÈÏpackage¡£
2.JavaµÄȨÏÞ
package accessȨÏÞ
    JavaµÄȨÏÞÓÐ public, protected, package access, private¡£±È½ÏÄ°ÉúµÄÊÇpackage access£¬µ±Àà»òÕßÀà³ÉԱûÓмÓÈκÎȨÏÞÏÞ¶¨·ûʱ£¬Õâ¸öÀà»òÕßÀà³ÉÔ±µÄȨÏÞ¾ÍÊÇpackage access¡£Ò²¾ÍÊÇ˵ֻÓÐÔÚͬһ¸öpackageÖпÉÒÔ·ÃÎÊ£¬ÔÚ²»Í¬packageÖÐÊÇÎÞ·¨·ÃÎʵġ£
ÀýÈçÔ


Ïà¹ØÎĵµ£º

JavaÖмÓÃÜËã·¨µÄÓ¦Óöþ£ºMD5

public static String getMD5(byte[] source) {
String s = null;
char hexDigits[] = { // ÓÃÀ´½«×Ö½Úת»»³É 16 ½øÖƱíʾµÄ×Ö·û
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
try
{
java. ......

JAVAÖÐStringÓëStringBuffer ¡¢StringBuilderµÄÇø±ð

 StringºÍStringBufferµÄÇø±ð£¬ÍøÉÏ×ÊÁÏ¿ÉÒÔ˵ÊÇÊý²»Ê¤Êý£¬µ«ÊÇ¿´µ½ÕâƪÎÄÕ£¬¸Ð¾õÀïÃæ×öµÄСÀý×ÓºÜÓдú±íÐÔ£¬ËùÒÔתһÏ£¬²¢×Ô¼º×öÁËÒ»µã×ܽᡣ
ÔÚjavaÖÐÓÐ3¸öÀàÀ´¸ºÔð×Ö·ûµÄ²Ù×÷¡£
1.Character ÊǽøÐе¥¸ö×Ö·û²Ù×÷µÄ£¬
2.String ¶ÔÒ»´®×Ö·û½øÐвÙ×÷¡£²»¿É±äÀà¡£
3.StringBuffer Ò²ÊǶÔÒ»´®×Ö·û½øÐвÙ×÷£¬µ«ÊÇ¿É ......

JavaÖеÄÊÂÎñ´¦Àí

JavaÖеÄÊÂÎñ´¦Àí
¡¡¡¡Ò»°ãÇé¿öÏ£¬J2EEÓ¦Ó÷þÎñÆ÷Ö§³ÖJDBCÊÂÎñ¡¢JTA£¨Java Transaction API£©ÊÂÎñ¡¢ÈÝÆ÷¹ÜÀíÊÂÎñ¡£Ò»°ãÇé¿öÏ£¬×îºÃ²»ÒªÔÚ³ÌÐòÖÐͬʱʹÓÃÉÏÊöÈýÖÖÊÂÎñÀàÐÍ£¬±ÈÈçÔÚJTAÊÂÎñÖÐǶÌ×JDBCÊÂÎñ¡£µÚ¶þ·½Ã棬ÊÂÎñÒªÔÚ¾¡¿ÉÄ̵ܶÄʱ¼äÄÚÍê³É£¬²»ÒªÔÚ²»Í¬·½·¨ÖÐʵÏÖÊÂÎñµÄʹÓá£ÏÂÃæÎÒÃÇÁоÙÁ½ÖÖÊÂÎñ´¦Àí·½Ê½¡£
¡¡¡¡ ......

¡¾×ªÔØ¡¿Javaѧϰ·¾¶

Javaѧϰ·¾¶£¨Ò»£©¹¤¾ßƪ
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJDKÊÇSun¹«Ë¾·¢²¼µÄJDK£¬³ýÁËSunÖ®Í⣬»¹Óкܶ๠......

¼¸ÖÖ³£¼ûµÄÊý¾Ý½á¹¹µÄJAVAʵÏÖ

 ITree
package utility.structure.def;
/**
*
* @author odie.tang
*
* @version 1.0 10/30/09
*/
public interface ITree<E>{

E getData();

E remove();

void setData(E e);

int getDepth();

int getLevel();

ITree<E> getRoot();

ITree<E> get ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ