Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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¶àÏß³Ìѧϰ

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

JAVA×î¶Ì·¾¶´úÂë

import java.util.LinkedList;
import java.util.List;
public class ShortestPaths {
     private static String showPath[] = { "", "", "", "", "", "" }; 
      
     & ......

¹ØÓÚjavaµÄhttpЭÒéÎļþÉÏ´«ÊµÓÃÀýÌâÒ»

¹ØÓÚjavaµÄhttpЭÒéÎļþÉÏ´«ÊµÓÃÀýÌâÒ»
(2006-07-25 16:43:56)
תÔØ

 

·ÖÀࣺ
java
¹ØÓÚjavaµÄhttpЭÒéÉÏ´«:(¼òµ¥ÊµÓöøÇÒ½¡×³;Ëٶȿì)
´Ë·½·¨±ÈapacheµÄÎļþÉÏ´«°ü(uploadfile1.1:¾ÍÎļþÉÏ´«¹¦ÄܶøÑÔ)Ҫǿ¶àÁË
1.Ö»ÐèÒªÒ»¸öMultipartRequest.java»ù±¾Îļþ¾ÍÐС£
2.ǰ̨htmlµÄ»ù±¾¸ñʽ
<html ......

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


 eclipseÑ¡Ò»¸ö±äÁ¿ºó£¬Õâ¸öÀàÀïµÄ¸Ã±äÁ¿²»±äÉ«ÎÊÌâ½â¾ö£º
alt + shift + o

/**
* дÈëÈÕÖ¾
* filePath ÈÕÖ¾ÎļþµÄ·¾¶
* code ҪдÈëÈÕÖ¾ÎļþµÄÄÚÈÝ

*/

public

static

boolean
print(String filePath,String code) {

try
{
File tofile
=
new
File(filePath);
......

JavaµÄÇóÖÊÊý

package stone;
public class PrimerNumber {
public static void main(String[] args) {
int MAX_NUMBER = 100;
boolean[] notPrimer= new boolean[MAX_NUMBER];
for(int i=2;i<=MAX_NUMBER;i++){
if(!notPrimer[i-1]){
for(int j=2*i;j<=MAX_NUMBER;j++){
if(j%i==0) notPrimer[j-1]=tr ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ