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

javaÃæÊÔÌâ¼°´ð°¸£¨»ù´¡Ìâ122µÀ£¬´úÂëÌâ19µÀ£©

JAVAÏà¹Ø»ù´¡ÖªÊ¶
1¡¢ÃæÏò¶ÔÏóµÄÌØÕ÷ÓÐÄÄЩ·½Ãæ
1.³éÏó£º
³éÏó¾ÍÊǺöÂÔÒ»¸öÖ÷ÌâÖÐÓ뵱ǰĿ±êÎ޹صÄÄÇЩ·½Ã棬ÒÔ±ã¸ü³ä·ÖµØ×¢ÒâÓ뵱ǰĿ±êÓйصķ½Ãæ¡£³éÏó²¢²»´òËãÁ˽âÈ«²¿ÎÊÌ⣬¶øÖ»ÊÇÑ¡ÔñÆäÖеÄÒ»²¿·Ö£¬ÔÝʱ²»Óò¿·Öϸ½Ú¡£³éÏó°üÀ¨Á½¸ö·½Ã棬һÊǹý³Ì³éÏ󣬶þÊÇÊý¾Ý³éÏó¡£
2.¼Ì³Ð£º
¼Ì³ÐÊÇÒ»ÖÖÁª½áÀàµÄ²ã´ÎÄ£ÐÍ£¬²¢ÇÒÔÊÐíºÍ¹ÄÀøÀàµÄÖØÓã¬ËüÌṩÁËÒ»ÖÖÃ÷È·±íÊö¹²ÐԵķ½·¨¡£¶ÔÏóµÄÒ»¸öÐÂÀà¿ÉÒÔ´ÓÏÖÓеÄÀàÖÐÅÉÉú£¬Õâ¸ö¹ý³Ì³ÆΪÀà¼Ì³Ð¡£ÐÂÀà¼Ì³ÐÁËԭʼÀàµÄÌØÐÔ£¬ÐÂÀà³ÆΪԭʼÀàµÄÅÉÉúÀࣨ×ÓÀࣩ£¬¶øԭʼÀà³ÆΪÐÂÀàµÄ»ùÀࣨ¸¸Àࣩ¡£ÅÉÉúÀà¿ÉÒÔ´ÓËüµÄ»ùÀàÄÇÀï¼Ì³Ð·½·¨ºÍʵÀý±äÁ¿£¬²¢ÇÒÀà¿ÉÒÔÐ޸ĻòÔö¼Óеķ½·¨Ê¹Ö®¸üÊʺÏÌØÊâµÄÐèÒª¡£
3.·â×°£º
·â×°Êǰѹý³ÌºÍÊý¾Ý°üΧÆðÀ´£¬¶ÔÊý¾ÝµÄ·ÃÎÊÖ»ÄÜͨ¹ýÒѶ¨ÒåµÄ½çÃæ¡£ÃæÏò¶ÔÏó¼ÆËãʼÓÚÕâ¸ö»ù±¾¸ÅÄ¼´ÏÖʵÊÀ½ç¿ÉÒÔ±»Ãè»æ³ÉһϵÁÐÍêÈ«×ÔÖΡ¢·â×°µÄ¶ÔÏó£¬ÕâЩ¶ÔÏóͨ¹ýÒ»¸öÊܱ£»¤µÄ½Ó¿Ú·ÃÎÊÆäËû¶ÔÏó¡£
4. ¶à̬ÐÔ£º
¶à̬ÐÔÊÇÖ¸ÔÊÐí²»Í¬ÀàµÄ¶ÔÏó¶ÔͬһÏûÏ¢×÷³öÏìÓ¦¡£¶à̬ÐÔ°üÀ¨²ÎÊý»¯¶à̬ÐԺͰüº¬¶à̬ÐÔ¡£¶à̬ÐÔÓïÑÔ¾ßÓÐÁé»î¡¢³éÏó¡¢ÐÐΪ¹²Ïí¡¢´úÂë¹²ÏíµÄÓÅÊÆ£¬ºÜºÃµÄ½â¾öÁËÓ¦ÓóÌÐòº¯ÊýͬÃûÎÊÌâ¡£
2¡¢StringÊÇ×î»ù±¾µÄÊý¾ÝÀàÐÍÂð?
»ù±¾Êý¾ÝÀàÐÍ°üÀ¨byte¡¢int¡¢char¡¢long¡¢float¡¢double¡¢booleanºÍshort¡£
java.lang.StringÀàÊÇfinalÀàÐ͵ģ¬Òò´Ë²»¿ÉÒԼ̳ÐÕâ¸öÀà¡¢²»ÄÜÐÞ¸ÄÕâ¸öÀࡣΪÁËÌá¸ßЧÂʽÚÊ¡¿Õ¼ä£¬ÎÒÃÇÓ¦¸ÃÓÃStringBufferÀà
3¡¢int ºÍ Integer ÓÐʲôÇø±ð
Java ÌṩÁ½ÖÖ²»Í¬µÄÀàÐÍ£ºÒýÓÃÀàÐͺÍԭʼÀàÐÍ£¨»òÄÚÖÃÀàÐÍ£©¡£IntÊÇjavaµÄԭʼÊý¾ÝÀàÐÍ£¬IntegerÊÇjavaΪintÌṩµÄ·â×°Àà¡£JavaΪÿ¸öԭʼÀàÐÍÌṩÁË·â×°Àà¡£
ԭʼÀàÐÍ·â×°Àà
booleanBoolean
charCharacter
byteByte
shortShort
intInteger
longLong
floatFloat
doubleDouble
ÒýÓÃÀàÐͺÍԭʼÀàÐ͵ÄÐÐΪÍêÈ«²»Í¬£¬²¢ÇÒËüÃǾßÓв»Í¬µÄÓïÒå¡£ÒýÓÃÀàÐͺÍԭʼÀàÐ;ßÓв»Í¬µÄÌØÕ÷ºÍÓ÷¨£¬ËüÃÇ°üÀ¨£º´óСºÍËÙ¶ÈÎÊÌ⣬ÕâÖÖÀàÐÍÒÔÄÄÖÖÀàÐ͵ÄÊý¾Ý½á¹¹´æ´¢£¬µ±ÒýÓÃÀàÐͺÍԭʼÀàÐÍÓÃ×÷ij¸öÀàµÄʵÀýÊý¾ÝʱËùÖ¸¶¨µÄȱʡֵ¡£¶ÔÏóÒýÓÃʵÀý±äÁ¿µÄȱʡֵΪ null£¬¶øԭʼÀàÐÍʵÀý±äÁ¿µÄȱʡֵÓëËüÃǵÄÀàÐÍÓйء£
4¡¢String ºÍStringBufferµÄÇø±ð
JAVAƽ̨ÌṩÁËÁ½¸öÀࣺStringºÍStringBuffer£¬ËüÃÇ¿ÉÒÔ´¢´æºÍ²Ù×÷×Ö·û´®£¬¼´°üº¬¶à¸ö×Ö·ûµÄ×Ö·ûÊý¾Ý¡£Õâ¸öStringÀàÌṩÁËÊýÖµ²»¿É¸Ä±äµÄ×Ö·û´®¡£¶øÕâ¸öStringBufferÀàÌṩµÄ×Ö·û´®½øÐÐÐ޸ġ£µ±


Ïà¹ØÎĵµ£º

ÓйØjavaÖеÄÒýÓÃÎÊÌâ

Ê×ÏÈ£¬java¶Ô¶ÔÏóºÍ»ù±¾ÀàÐ͵Ĵ¦ÀíÊDz»Ò»ÑùµÄ£¬ºÍCÓïÑÔÒ»Ñù£¬µ±°ÑJavaµÄ»ù±¾Êý¾ÝÀàÐÍ£¨Èçint£¬char£¬doubleµÈ£©×÷ΪÈë¿Ú²ÎÊý´«¸øº¯ÊýÌåµÄʱºò£¬´«ÈëµÄ²ÎÊýÔÚº¯ÊýÌåÄÚ²¿±ä³ÉÁ˾ֲ¿±äÁ¿£¬Õâ¸ö¾Ö²¿±äÁ¿ÊÇÊäÈë²ÎÊýµÄÒ»¸ö¿½±´£¬ËùÓеĺ¯ÊýÌåÄÚ²¿µÄ²Ù×÷¶¼ÊÇÕë¶ÔÕâ¸ö¿½±´µÄ²Ù×÷£¬º¯ÊýÖ´ÐнáÊøºó£¬Õâ¸ö¾Ö²¿±äÁ¿Ò²¾ÍÍê³ÉÁËËüµÄʹÃü£¬ ......

C#ºÍJavaÖеķ½·¨×¢Ï¤

·Ç³£¼òµ¥,ÔÚC#ÖÐÖ»ÐèÒªÔÚÀàµÄ·½·¨µÄÉÏ·½ÇÃÈýÏÂ"/"¾Í×Ô¶¯°ïÄãÌí¼ÓÏà¹ØµÄ´úÂë,ÄãÖ»Òª°´×ÅÌîд¾Í¿ÉÒÔÁË,¶øJavaÔòÊÇÊäÈë"/**",ËüÒ²»á×Ô¶¯ÐγÉÏà¹Ø´úÂë,¾ßÌå´úÂëÈçÏÂ:
C#
/// <summary>
/// ÔÚ´ËÌîд×ÜÌåÃèÊö
///</summary>
/// <param name="name">ÕâÀïÌîд²ÎÊýnameµÄÃèÊö</param>
public string ......

Java JNIÉî¶È·ÖÎöÓëʵ¼ù


Java JNIÊÇJava Native InterfaceµÄËõд£¬ÖÐÎÄ¿ÉÒëΪJava±¾µØµ÷Óá£Java Native Interface (JNI)±ê×¼³ÉΪjavaƽ̨µÄÒ»²¿·Ö£¬ËüÔÊÐíJava´úÂëºÍÆäËûÓïÑÔдµÄ´úÂë½øÐн»»¥¡£±¾ÎÄÏòÄúÏêϸ½éÉÜJava JNI¡£
Java »·¾³ºÍÓïÑÔ¶ÔÓÚÓ¦ÓóÌÐò¿ª·¢À´ËµÊǷdz£°²È«ºÍ¸ßЧµÄ¡£µ«ÊÇ£¬Ò»Ð©Ó¦ÓóÌÐòÈ´ÐèÒªÖ´Ðд¿ Java ³ÌÐòÎÞ·¨Íê³ÉµÄһЩÈÎÎ ......

Java Semaphore

package test;
/**
*
* @author openpk
*/
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Semaphore;
public class Main {
public static void main(String[] args) {
// Ï̳߳Ø
ExecutorService exec = Executors ......

How Java handles arguments of a class type.

=====suppose such a method:
public static void openFile(String fileName, PrintWriter stream) throws FileNotFoundException
{
   stream = new PrintWriter(fileName);
}
=====then we want to use it this way:
PrintWriter toFile = null;
try
{
   openFile("data.txt", t ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ