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

JavaÓïÑÔµÄ26¸öϸ½Ú


JavaÓïÑÔµÄ26¸öϸ½Ú[תÔØ]
Java×÷ΪһÃÅÓÅÐãµÄÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼ÆÓïÑÔ,ÕýÔÚ±»Ô½À´Ô½¶àµÄÈËʹÓᣱ¾ÎÄÊÔͼÁгö×÷ÕßÔÚʵ¼Ê¿ª·¢ÖÐÅöµ½µÄһЩJavaÓïÑÔµÄÈÝÒ×±»È˺öÊÓµÄϸ½Ú,Ï£ÍûÄܸøÕýÔÚѧϰJavaÓïÑÔµÄÈËÓÐËù°ïÖú¡£
1£¬Î»ÒÆÔËËãÔ½½çÔõô´¦Àí
    ¿¼²ìÏÂÃæµÄ´úÂëÊä³ö½á¹ûÊǶàÉÙ?
    int a=5;
    System.out.println(a<<33);
°´ÕÕ³£ÀíÍƲâ,°Ña×óÒÆ33λӦ¸Ã½«aµÄËùÓÐÓÐЧλ¶¼ÒƳöÈ¥ÁË£¬ÄÇʣϵĶ¼ÊÇÁã°¡£¬ËùÒÔÊä³ö½á¹ûÓ¦¸ÃÊÇ0²Å¶Ô°¡£¬¿ÉÊÇÖ´Ðкó·¢ÏÖÊä³ö½á¹ûÊÇ10£¬ÎªÊ²Ã´ÄØ£¿ÒòΪJavaÓïÑÔ¶ÔλÒÆÔËËã×÷ÁËÓÅ»¯´¦Àí£¬JavaÓïÑÔ¶Ôa<<bת»¯Îªa<<(b%32)À´´¦Àí£¬ËùÒÔµ±ÒªÒÆλµÄλÊýb³¬¹ý32ʱ£¬Êµ¼ÊÉÏÒÆλµÄλÊýÊÇb%32µÄÖµ£¬ÄÇôÉÏÃæµÄ´úÂëÖÐa<<33Ï൱ÓÚa<<1£¬ËùÒÔÊä³ö½á¹ûÊÇ10¡£
2£¬¿ÉÒÔÈÃi!=iÂð£¿
µ±Äã¿´µ½Õâ¸öÃüÌâµÄʱºòÒ»¶¨»áÒÔΪÎÒ·èÁË£¬»òÕßJavaÓïÑÔ·èÁË¡£Õâ¿´ÆðÀ´ÊǾø¶Ô²»¿ÉÄܵģ¬Ò»¸öÊýÔõô¿ÉÄܲ»µÈÓÚËü×Ô¼ºÄØ£¿»òÐí¾ÍÕæµÄÊÇJavaÓïÑÔ·èÁË£¬²»ÐÅ¿´ÏÂÃæµÄ´úÂëÊä³öʲô£¿
  double i=0.0/0.0;
  if(i==i){
      System.out.println("Yes i==i");
  }else{
      System.out.println("No i!=i");
  }
ÉÏÃæµÄ´úÂëÊä³ö"No i!=i"£¬ÎªÊ²Ã´»áÕâÑùÄØ£¿¹Ø¼üÔÚ0.0/0.0Õâ¸öÖµ£¬ÔÚIEEE 754¸¡µãËãÊõ¹æÔòÀï±£ÁôÁËÒ»¸öÌØÊâµÄÖµÓÃÀ´±íʾһ¸ö²»ÊÇÊý×ÖµÄÊýÁ¿¡£Õâ¸öÖµ¾ÍÊÇNaN("Not a Number"µÄËõд)£¬¶ÔÓÚËùÓÐûÓÐÁ¼ºÃ¶¨ÒåµÄ¸¡µã¼ÆË㶼½«µÃµ½Õâ¸öÖµ£¬±ÈÈ磺0.0/0.0£»ÆäʵÎÒÃÇ»¹¿ÉÒÔÖ±½ÓʹÓÃDouble.NaNÀ´µÃµ½Õâ¸öÖµ¡£ÔÚIEEE 754¹æ·¶ÀïÃæ¹æ¶¨NaN²»µÈÓÚÈκÎÖµ£¬°üÀ¨Ëü×Ô¼º¡£ËùÒÔ¾ÍÓÐÁËi£¡=iµÄ´úÂë¡£
3£¬ÔõÑùµÄequals²Å°²È«£¿
    ÎÒÃǶ¼ÖªµÀÔÚJava¹æ·¶ÀﶨÒåÁËequals·½·¨¸²¸ÇµÄ5´óÔ­Ôò£ºreflexive£¨·´ÉíÐÔ£©£¬symmetric£¨¶Ô³ÆÐÔ£©£¬transitive£¨´«µÝÐÔ£©£¬consistent£¨Ò»ÖÂÐÔ£©£¬non-null£¨·Ç¿ÕÐÔ£©¡£ÄÇô¿¼²ìÏÂÃæµÄ´úÂ룺
public class Student{
    private String name;
    private int age;
    public Student(String name,int age){
        this.name=name;
        this.age=age;
    }
    public boolean equals(Object obj){
       


Ïà¹ØÎĵµ£º

¹ØÓÚjava´ò°ü

Ò»¸ö¼òµ¥µÄË«»÷¾ÍÄÜÔËÐÐjarÎļþµÄ´ò°ü¹ý³Ì:
http://blog.csdn.net/ihc523/archive/2009/10/11/4636832.aspx
eclipseµ¼³öjarÎļþÔÙ½«Ëüת»»³Éexe¿ÉÖ´ÐÐÎļþ:
http://hi.baidu.com/%C4%CF%BA%BD%CC%EC%CF%C2/blog/item/1601a381ac9af9d1bd3e1e3d.html
´òJar°üµÄÒ»¸öEclipse²å¼þFatJar:
http://blog.csdn.net/lqsmn613/ar ......

javaÕýÔò±í´ïʽѧϰ

1.×Ö·û
x    ×Ö·û x¡£ÀýÈça±íʾ×Ö·ûa
\\    ·´Ð±Ïß×Ö·û¡£ÔÚÊéдʱҪдΪ\\\\¡££¨×¢Ò⣺ÒòΪjavaÔÚµÚÒ»´Î½âÎöʱ,°Ñ\\\\½âÎö³ÉÕýÔò±í´ïʽ\\£¬ÔÚµÚ¶þ´Î½âÎöʱÔÙ½âÎöΪ\£¬ËùÒÔ·²ÊDz»ÊÇ1.1Áоٵ½µÄתÒå×Ö·û£¬°üÀ¨1.1µÄ\\,¶øÓÖ´øÓÐ\µÄ¶¼ÒªÐ´Á½´Î£©
\0n    ´øÓа˽øÖÆÖµ 0µÄ×Ö·û ......

java¶àÏß³Ìѧϰ

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

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();
......

java:Applet²¼¾ÖÎÊÌâ,ÈçºÎÌí¼Ó°´Å¥£¬±êÇ©ÎÊÌâ×ܽá

½ñÌìѧϰÁËapplet²¼¾ÖÎÊÌ⣺
°´Å¥¡¢±êÇ©ÊÇÔõÑù¼ÓÈëµ½applet³ÌÐò(ÈÝÆ÷)µ±ÖÐÈ¥µÄÄØ£¿
ÐèÒªÓõ½²¼¾ÖÈÝÆ÷¹ÜÀíÆ÷(LayoutManager)£ºËüÓÃÓÚЭÖúÈÝÆ÷È·¶¨¼ÓÈëµÄ×é¼þ(°´Å¥µÈ)Ó¦¸Ã·ÅÖõÄλÖÃ
awtÌṩÁË4Öг£ÓõIJ¼¾ÖÈÝÆ÷¹ÜÀíÆ÷
>>FlowLayout
>>BorderLayout
>>GridLayout
>>CardLayout
appletĬÈÏÊ¹Ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ