java ×Ö·û´®±È½Ï
ÊìϤC++µÄÈ˶ÔÓÚÁ½¸ö×Ö·û´®±È½ÏµÄ´úÂëÒ»¶¨ºÜÁ˽⣺
(string1==string2)
µ«ÔÚjavaÖУ¬Õâ¸ö´úÂ뼴ʹÔÚÁ½¸ö×Ö·û´®ÍêÈ«ÏàͬµÄÇé¿öÏÂÒ²»á·µ»Øfalse
JavaÖбØÐëʹÓÃstring1.equals(string2)À´½øÐÐÅжÏ
²¹³ä
Èç¹û£º
string s1=new String("Hello");
string s2=new String("Hello");
Ôò(s1==s2)=false
Èç¹û£º
string s1="Hello";
string s2="Hello";
Ôò(s1==s2)=true;
ÒòΪËûÃÇÖ¸ÏòµÄͬһ¸ö¶ÔÏó¡£
Èç¹û°ÑÆäËû±äÁ¿µÄÖµ¸³¸øs1ºÍs2£¬¼´Ê¹ÄÚÈÝÏàͬ£¬ÓÉÓÚ²»ÊÇÖ¸Ïòͬһ¸ö¶ÔÏó£¬Ò²»á·µ»Øfalse¡£ËùÒÔ½¨ÒéʹÓÃequals()£¬ÒòΪequals±È½ÏµÄ²ÅÊÇÕæÕýµÄÄÚÈÝ
Ïà¹ØÎĵµ£º
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......
¡¡¡¡»¥ÁªÍøµÄáÈÆð£¬Ê¹µÃPC´Ó²úÒµÖÐÐÄÏò±ßÔµ¹ý¶É£¬¶øÀú¾20ÓàÄêµÄ·¢Õ¹£¬PCÊг¡Ò²Ç÷ÓÚ±¥ºÍ£¬´½Íö³Ýº®£¬Õâ½Ð¿¿PC³Ô·¹µÄ΢ÈíÈçºÎ²»¼±£¿ÎüÈ¡Á˵±Ä꿪·¢ä¯ÀÀÆ÷Èí¼þµÄ½Ìѵ£¬2000Äê6Ô£¬Î¢ÈíÆô¶¯.Net¼Æ»®£¬½ø¾üÍøÂç·þÎñÊг¡£¬±È¶û·¸Ç´Ä×ÔÐŵسƣº"ÊÀ½çÉÏËùÓÐÒ»Çж¼½«°üÀ¨ÔÚ»¥ÁªÍø·þÎñÖС£"
¡¡¡¡.NETµÄ˼ÏëÆäʵÊÇÀ´Ô ......
1¡¢±àдһ¸ö¼òµ¥µÄÎı¾±à¼Æ÷£¬ÒªÇ󣺾ßÓдò¿ª¡¢±£´æ¡¢Ð½¨£¬Õ³Ìù¡¢¸´ÖƵȹ¦ÄÜ£»¾ßÓÐÒ»¸ö¹¤¾ßÌõ¡£
1.1¡¢³ÌÐòÔ´Â루²Î¼ûmenu.java£©£º
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.URL;
public class menu extends JFrame impl ......
µÚÒ»£º
1.StringÊÇ×î»ù±¾µÄÊý¾ÝÀàÐÍô£¿
´ð£º²»ÊÇ¡£»ù±¾µÄÊý¾ÝÀàÐÍ°üÀ¨£ºbyte,int,char,long,float,double,booleanºÍshort.
java.lang.StringÀàÊÇfinalÀàÐ͵ģ¬Òò´Ë²»¿ÉÒԼ̳ÐÕâ¸öÀ࣬²»ÄÜÐÞ¸ÄÕâ¸öÀà¡£
2.¾²Ì¬±äÁ¿ºÍʵÀý±äÁ¿µÄÇø±ð£¿
´ð£ºstatic i = 10 ;//³£Á¿
&nb ......
package barchartdemo1;
import java.awt.Font;
import java.io.FileOutputStream;
import java.io.IOException;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.Numbe ......