javaÖÐÊäÈëÊä³ö×ܽá
µÚÒ»½Ú Êý¾ÝÁ÷µÄ»ù±¾¸ÅÄî
Àí½âÊý¾ÝÁ÷
Á÷Ò»°ã·ÖΪÊäÈëÁ÷£¨Input Stream£©ºÍÊä³öÁ÷£¨Output Stream£©Á½À࣬µ«ÕâÖÖ»®·Ö²¢²»ÊǾø¶ÔµÄ¡£±ÈÈçÒ»¸öÎļþ£¬µ±ÏòÆäÖÐдÊý¾Ýʱ£¬Ëü¾ÍÊÇÒ»¸öÊä³öÁ÷£»µ±´ÓÆäÖжÁÈ¡Êý¾Ýʱ£¬Ëü¾ÍÊÇÒ»¸öÊäÈëÁ÷¡£µ±È»£¬¼üÅÌÖ»ÊÇÒ»¸öÊýÈËÁ÷£¬¶øÆÁÄ»ÔòÖ»ÊÇÒ»¸öÊä³öÁ÷¡£
JavaµÄ±ê×¼Êý¾ÝÁ÷
±ê×¼ÊäÈëÊä³öÖ¸ÔÚ×Ö·û·½Ê½Ï£¨ÈçDOS£©£¬³ÌÐòÓëϵͳ½øÐн»»¥µÄ·½Ê½£¬·ÖΪÈýÖÖ£º
±ê×¼ÊäÈëstudin,¶ÔÏóÊǼüÅÌ¡£
±ê×¼Êä³östdout,¶ÔÏóÊÇÆÁÄ»¡£
±ê×¼´íÎóÊä³östderr,¶ÔÏóÒ²ÊÇÆÁÄ»¡£
Àý 8.1 ´Ó¼üÅÌÊäÈë×Ö·û¡£
±¾ÀýÓÃSystem.in.read(buffer)´Ó¼üÅÌÊäÈëÒ»ÐÐ×Ö·û£¬´æ´¢ÔÚ»º³åÇøbufferÖУ¬count±£´æʵ¼Ê¶ÁÈëµÄ×Ö½Ú¸öÊý£¬ÔÙÒÔÕûÊýºÍ×Ö·ûÁ½ÖÖ·½Ê½Êä³öbufferÖеÄÖµ¡£Read·½·¨ÔÚjava.io°üÖУ¬¶øÇÒÒªÅ׳öIOExceptionÒì³£¡£³ÌÐòÈçÏ£º
import java.io.*;
public class Input1
{
public static void main(String args[]) throws IOException
{
System.out.println("Input: ");
byte buffer[] = new byte[512]; //ÊäÈ뻺³åÇø
int count = System.in.read(buffer); //¶ÁÈ¡±ê×¼ÊäÈëÁ÷
System.out.println("Output: ");
for (int i=0;i<COUNT;I++) Êä³öbufferÔªËØÖµ
{
System.out.print(" "+buffer[i]);
}
System.out.println();
for (int i=0;i<COUNT;I++) °´×Ö·û·½Ê½Êä³öbuffer
{
System.out.print((char) buffer[i]);
}
System.out.println("count = "+ count); //bufferʵ¼Ê³¤¶È
}
}
³ÌÐòÖУ¬main·½·¨²ÉÓÃthrows×Ó¾äÅ׳öIOExceptionÒì³£½»ÓÉϵͳ´¦Àí¡£
Java.io°üÖеÄÊý¾ÝÁ÷¼°ÎļþÀà
×Ö½ÚÁ÷£º
¡¡¡¡´ÓInputStreamºÍOutputStreamÅÉÉú³öÀ´µÄһϵÁÐÀà¡£ÕâÀàÁ÷ÒÔ×Ö½Ú(byte)Ϊ»ù±¾´¦Àíµ¥Î»¡£
InputStream¡¢OutputStream
¡ó FileInputStream¡¢FileOutputStream
¡ó PipedInputStream¡¢PipedOutputStream
¡ó ByteArrayInputStream¡¢ByteArrayOutputStream
¡ó FilterInputStream¡¢FilterOutputStream
¡ó DataInputStream¡¢DataOutputStream
&nbs
Ïà¹ØÎĵµ£º
1¡¢length() ×Ö·û´®µÄ³¤¶È
¡¡¡¡Àý£ºchar chars[]={'a','b'.'c'};
¡¡¡¡¡¡¡¡String s=new String(chars);
¡¡¡¡¡¡¡¡int len=s.length();
2¡¢charAt() ½ØÈ¡Ò»¸ö×Ö·û
¡¡¡¡Àý£ºchar ch;
¡¡¡¡¡¡¡¡ch="abc".charAt(1); ·µ»Ø'b'
3¡¢getChars() ½ØÈ¡¶à¸ö×Ö·û
¡¡¡¡void getChars(int sourceStart,int sourceEnd,char tar ......
Ò»¡¢±³¾°
×î½üÒ»Äê¶àÀ´,ÔÚInternetÉϳöÏÖµÄÌرðÎüÒýÈ˵Äʼþ¾ÍÊÇJavaÓïÑÔºÍÓÃJava±àдµÄä¯ÀÀÆ÷HotJava¡£
1991Äê,SUNMicroSystem¹«Ë¾µÄJameGosling¡¢BillJoeµÈÈË,ΪÔÚµçÊÓ¡¢¿ØÖÆ¿¾Ãæ°üÏäµÈ¼ÒÓÃÏû·ÑÀàµç×Ó²úÆ·ÉϽøÐн»»¥Ê½²Ù×÷¶ø¿ª·¢ÁËÒ»¸öÃûΪOakµÄÈí¼þ(¼´Ò»ÖÖÏðÊ÷µÄÃû×Ö),µ«µ±Ê±²¢Ã»ÓÐÒýÆðÈËÃǵ ......
Èç¹û´Ó·¿´Thinking in java ÕâÊéËãÆð£¬ÄÇÎÒÒѾ¿´Á˲¶àÈý¸öÔÂÁË£¬µ«ÊÇÊÂʵÉÏÕæÕý°Ñ»¨ÔÚ˼¿¼JAVAÎÊÌâÉϵÄʱ¼äËãÏ£¬¿ÉÕæÊÇÈÃ×Ô¼º¶¼Óеã˵²»¹ýÈ¥¡£ÖÖÖÖÀíÓɶ¼³ä³â×ÅÎÒµÄÉñ¾£¬µ«Î޷Ƕ¼ÊÇÀÁ¶èÕßµÄ×ÔÎÒ±£»¤µÄÊֶΣ¬ÎÒ²»µÃ²»¸Ð¿®ÕæµÄÊÇ×Ô¼ºÌ«²»ÉϽøÁË¡£
&nbs ......
1£¬Java3D ×÷Ϊsun¹«Ë¾½ÏÔçÍƳöµÄÒ»Ïî3d¼¼Êõ£¬ÊÇÒ»Öָ߶ȷâ×°µÄapi£¬¹¹½¨ÔÚopenglºÍdirect3dÖ®ÉÏ£¬¿ÉÒÔ˵ÊÇ×îÓÐÃûµÄjavaµÄ3d¼¼Êõ¡£ÓÉÓÚÖÖÖÖÔÒò£¨apiÉè¼Æ£¬ÃæÏòµÄÓû§²»Ã÷È·£©£¬java3dһֱûÓа취Á÷ÐУ¬²»¾ÃÇ°java3dµÄÍŶÓÐû²¼ÔÝÍ£¶Ôjava3dй¦ÄܵĿª·¢£¬×ª¶øΪJavaFX¿ª·¢3d äÖȾÒýÇ档ͬʱsunµÄÁíÒ»¸öÏîÄ¿ project wonder ......
ÈçºÎÈ¡µÄJavaÔ´´úÂëÎļþÖÐÎļþÃûºÍÐкţº£©
ÔÚC/C++µÄ³ÌÐò£¬±àÒëÆ÷ÌṩÁËÁ½¸öºêÀ´Ö§³ÖÈ¡µÃÔ´ÎļþÖеÄÐкźÍÎļþÃû£¬ÕâÁ½¸öºêÊÇ__FILE__,__LINE__
Äã¿ÉÒÔÈçϵķ½·¨´òÓ¡ÐкźÍÎļþÃû
²é¿´Ô´´úÂë
´òÓ¡°ïÖú
1 #include <stdio.h>
2 int main()
3 {
4&nbs ......