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

C++תJAVAÐèҪעÒâµÄ¼¸µã

ƪÎÄÕÂÊÇ×î½ü¸Õ¿´µ½µÄ£¬ËäÈ»ÊÇ˵³ÌÐòÔ±´ÓC++תJAVAÐèҪעÒâµÄµØ·½£¬µ«ÊǺÜÏêϸµÄ˵³öÁËC++ºÍJAVAµÄ²»Í¬µÄµØ·½£¬¶ÔÓÚJAVAÖÐΪʲôûÓÐÖ¸Õ롢ΪʲôûÓÐÄÚ´æй¶¡¢½Ó¿ÚºÍC++ÖжàÖؼ̳еĹØϵ¡¢Òì³£»úÖƵÈÎÊÌâÒ²ÃèÊöµÄºÜÏêϸ£¬¹ÊתÔعýÀ´¡£
1.JavaÔÚÐéÄâ»úÉÏÔËÐÐ
JavaÔ´´úÂë²¢²»ÊDZ»±àÒë³ÉΪÆÕͨµÄ»úÆ÷´úÂë¡£¶øÊDZ»·­Òë³ÉΪÐéÄâ»ú¿ÉÒÔÖ´ÐеĴúÂë¡£Ò»¸öJava½âÊÍÆ÷×îÖÕÖ´ÐÐÕâЩ´úÂë¡£ÕâÆäÖÐûÓÐÁ¬½ÓµÄ¹ý³Ì;½âÊÍÔÚÐèÒªµÄʱºò¶¯Ì¬µÄ¼ÓÔØһЩÀà;
2.JavaÊÇÍêÈ«ÃæÏò¶ÔÏóµÄ
JavaÊÇÒ»ÖÖÍêÈ«ÃæÏò¶ÔÏóµÄÓïÑÔ¡£ÕâÒâζ×ÅÄã¶ÔÈκÎÒ»¸öJava¶ÔÏóËù×öµÄ¶¯×÷¶¼ÊÇͨ¹ýÒ»¸ö·½·¨ÊµÏֵġ£µÚÒ»µã¾ÍÊÇ£¬ÔÙҲûÓÐûÓÐÖ÷º¯ÊýÕâÑùµÄ¹ÂÁ¢µÄ¶«Î÷ÁË¡£È¡¶ø´úÖ®µÄÊÇ£¬Äã±ØÐ뿪ʼÓÃÒ»¸ö¶ÔÏóµÄ¿´·¨¿´´ýÒ»¸ö³ÌÐò£¬Ò»¸öÀàµÄ¶ÔÏó¡£µ«ÊÇÕâ¸ö¶ÔÏóÓÖʲô¶ÔÏóÄØ?´ó¶àÊýJava³ÌÐòÖ»ÊǼòµ¥µÄͨ¹ý¼Ì³ÐJava»ù´¡ÀàObjectÀ´ÊµÏÖËùÐèÒªµÄ¶«Î÷£¬µ«ÊÇÄã¿ÉÒÔͨ¹ý´´½¨³ÌÐò»ù´¡ÀàÓÃÓÚ¶à¸öÌØÐÔÏàËƵÄÓ¦ÓóÌÐòÀ´½Úʡʱ¼ä¡£
ÑϸñµÄÃæÏò¶ÔÏóµÄ¹æ¶¨Òâζ×ÅÀíÓÃÔ­ÓеÄC/C++´úÂë²»¿ÉÒÔÖ±½Ó²»¼Ó¸Ä¶¯µÄʹÓÃ;ϵͳµ÷ÓÃÒ²ÊÇÕâÑùµÄ¡£C++ÖУ¬Äã¿ÉÒÔͨ¹ýÔÚC++Õý³£µÄÃüÃû¿Õ¼äÍâÉùÃ÷extern"C"À´Ê¹ÓÃÔ­ÓеÄCµÄ¹ý³Ìµ÷Ó㬰üÀ¨ÏµÍ³µ÷Óá£
ÔÚJavaÖУ¬Ö»ÓÐÒ»¸öÀàËƵݲȫ»ØËݵķ½·¨£¬µ«ÊDz¢²»ÊÇÊ®·Ö¼òµ¥µÄ·½·¨¡£Äã±ØÐ붨ÒåÒ»¸ö±¾µØ·½·¨£¬ÆäÄ¿µÄÊÇΪCÓïÑÔÌṩ½Ó¿Ú£¬È»ºóÌṩÁ¬½ÓµÄ½éÖÊ¡£Java»·¾³ÌṩÁËÍê³ÉÕâÖÖÈÎÎñµÄ¹¤¾ß£¬µ«ÊÇÕû¸ö¹ý³ÌºÍC++ÖÐÌṩµÄextern±È΢²»×ãµÀ£¬Íê³ÉʹÓÃC++ÀàµÄ¹ý³ÌÔò¸ü¼Ó¸´ÔÓ£¬ÒòΪÕâÑù»áÒýÈë¶ÔCµÄ½è¿ÚºÍCº¯ÊýºÍC++³ÉÔ±º¯ÊýµÄÎÊÌâ¡£
ÐÒÔ˵ÄÊÇ£¬Ðí¶à³£ÓõÄϵͳʵÓù¤¾ßº¯ÊýÒѾ­ÔÚϵͳÀàÖеķ½·¨ÖÐÌṩ³öÀ´£¬µ«ÊÇÕâЩÃ÷ÏÔûÓаüº¬¾­¹ýÐí¶àÄêÀ´ÄãËù´´½¨µÄÄÇЩÀàºÍ¹ý³Ì¡£ËùÒÔ£¬ÔÚÄãÐèÒªµÄʱºòÄãÓ¦¸ÃÈ¥×êÑÐһϡ£
3.JavaÖÐûÓжÀÁ¢µÄÍ·Îļþ
ÔÚJavaÖУ¬¹ØÓÚÀàµÄÒ»Çж«Î÷¶¼±»·Åµ½Ò»¸öµ¥¶ÀµÄÎļþÖС£·½·¨µÄλÖÃÖ»¿ÉÄÜÔÚÒ»¸öµØ·½³öÏÖ£¬Ò»¸ö·½·¨µÄʵÏÖ±ØÐëÔÚËüµÄ¶¨Òå¹ý³ÌÖÐͬʱ½øÐС£ÕâÑù×öµÃÓŵãÊÇÔÚʵÏÖ³ÌÐòµÄʱºò²»ÈÝÒ×ÒòΪÎļþµÄ·Çͬ²½´íÎó¶øʧ°Ü£¬»òÕß»ñÈ¡µ½Ò»¸öûÓÐʵÏÖµÄÉùÃ÷¡£ÀàµÄÉùÃ÷¿ÉÒÔ±»Java½âÊÍÆ÷ÀûÓÃÉõÖÁÊÇ´ÓÒ»¸ö±àÒë¹ýµÄµ¥ÔªÖлñÈ¡£¬ËùÒÔ²»ÔÙÐèÒªÓÐÍ·Îļþ£¬Ö»ÒªÓбàÒë¹ýµÄÎļþ¡£
ÕâÑù×öµÄȱµãÓëÎÒÃDZà³ÌµÄ¹ý³ÌÓйء£Ðí¶àC++³ÌÐòԱϲ»¶ÓÃÍ·ÎļþÀ´´úÌæÎĵµ¡£Òª¿´Ò»¸ö³ÉÔ±º¯ÊýµÄ½Ó¿Ú²ÎÊý£¬Ö»ÐèÒª¿´Í·ÎļþÖеÄÉùÃ÷¼´¿É¡£Äã¿ÉÒÔ¾­³£µÄ¿´Í·Îļþ¼´¿ÉÁ˽âÔõÑùȥʹÓÃÕâ¸öÀà¡£ÔÚJavaÖУ¬Ã»ÓÐÕâÑùµ


Ïà¹ØÎĵµ£º

JAVA »ñÈ¡±¾ÖܵÄÆðʼÈÕÆÚ troy

import java.text.DateFormat;
import java.util.Calendar;
import java.util.Date;
/**
 * @author troy(J2EE)
 * @version 1.0
 */
public class Test {
 public static void main(String[] args) throws Exception {
  DateFormat df = DateFormat.getDateInstance();
 &n ......

Java¼ÓÃܺÍÊý×ÖÇ©Ãû 1ÏûÏ¢ÕªÒª

±¾ÎÄÖ÷Ҫ̸һÏÂÃÜÂëѧÖеļÓÃܺÍÊý×ÖÇ©Ãû£¬ÒÔ¼°ÆäÔÚjavaÖÐÈçºÎ½øÐÐʹÓ᣶ÔÃÜÂëѧÓÐÐËȤµÄ»ï°é£¬ÍƼö¿´Bruce SchneierµÄÖø×÷£ºApplied Crypotography.ÔÚjdk1.5µÄ·¢Ðа汾Öа²È«ÐÔ·½ÃæÓÐÁ˺ܴóµÄ¸Ä½ø£¬Ò²ÌṩÁ˶ÔRSAËã·¨µÄÖ±½ÓÖ§³Ö£¬ÏÖÔÚÎÒÃÇ´ÓʵÀýÈëÊÖ½â¾öÎÊÌ⣨±¾ÎĽöÊÇ×÷Ϊ¼òµ¥½éÉÜ£©£º
    Ò»¡¢ÃÜÂëѧÉÏ ......

java¶àÏß³Ìѧϰ

¹ØÓÚ Java Concurrency
 
   ×Ô´ÓJavaµ®Éú֮ʱ£¬Java ¾ÍÖ§³Ö²¢ÐеĸÅÄ±ÈÈçÏ̺߳ÍËø»úÖÆ¡£Õâ¸ö½Ì³Ì°ïÖú¿ª·¢¶àÏß³ÌJava³ÌÐòÔ±Äܹ»Àí½âºËÐĵÄJava²¢ÐÐÀíÄîÒÔ¼°ÈçºÎʹÓÃËûÃÇ¡£ ÄÚÈÝÉæ¼°µ½JavaÓïÑÔÖеÄỊ̈߳¬ ÖØÁ·¼¶ÒÔ¼°ÇáÁ¿¼¶Í¬²½»úÖÆ ÒÔ¼°JavaSE 5 ÖеÄËø£¬Ô­×ÓÁ¿ ²¢ÐÐÈÝÆ÷£¬Ï̵߳÷¶È ÒÔ¼°Ïß³ÌÖ´ÐÐÕß ......

java µÄ°æ±¾Òì³£

ѧϰ֮·×ÜÊDz¢²»Æ½Ì¹µÄ£¬Õâ²»£¬Ò»¿ªÊ¼¾ÍÓöµ½ÎÊÌâÁË£ºBad version number in .class file¡£°æ±¾²»¶Ô£¿¿ÉÊÇÎÒÓõÄjavaÒÔ¼°javac¶¼ÊÇJDK5ѽ£¬Ôõô»ØÊ£¿³ýÁ˱àÒë°æ±¾¸úÔËÐа汾²»Ò»ÖÂÍâÊDz»»á³öÏÖÕâÖÖ¿ÉÄܵġ£Í»È»ÏëÆðÇ°¼¸ÌìÊÔÁËÒ»ÏÂJDK6£¬°ÑEclipseµÄJDK±àÒëÆ÷Ñ¡³ÉJDK6ÁË¡£¹ûÈ»£¬½«Æä¸Ä»ØÈ¥JDK5¾ÍÐÐÁË¡£
================== ......

JAVA³£ÓòÙ×÷Óï¾ä ÏîÄ¿ÖеÄ×ܽáÁù


ÅжÏÒ»¸öÎļþÊÇ·ñΪ¶þ½øÖÆÎļþ
public static boolean isBinary(File file) {
boolean isBinary = false;
try {
FileInputStream fin = new FileInputStream(file);
long len = file.length();
  for (int j = 0; j < (int) len; j++) {
int t = fin.read();
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ