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

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


Ïà¹ØÎĵµ£º

JavaÏòÉÏתÐÍ

ͨË×Àí½âÏòÉÏתÐÍ£º
¾ÍÊÇ×ÓÀàתÐͳɸ¸Àà¡£
class A{}
class B extends A { }
A b = new B();
Õâ¸ö¾ÍÊÇÏòÉÏתÐÍ¡£
ÏòÉÏתÐÍ¿ÉÒÔÏñÏÂÃæÕâÌõÓï¾äÕâô¼òµ¥:
      Shape s =new Circle();
      ÕâÀ´´½¨Ò»¸öCircle¶ÔÏ ......

java²¢·¢±à³Ìʵ¼ù±Ê¼Ç

  1, ±£Ö¤Ḭ̈߳²È«µÄÈýÖÖ·½·¨: a, ²»Òª¿çÏ̷߳ÃÎʹ²Ïí±äÁ¿b, ʹ¹²Ïí±äÁ¿ÊÇfinalÀàÐ͵Äc, ½«¹²Ïí±äÁ¿µÄ²Ù×÷¼ÓÉÏͬ²½
    2, Ò»¿ªÊ¼¾Í½«ÀàÉè¼Æ³ÉḬ̈߳²È«µÄ, ±ÈÔÚºóÆÚÖØÐÂÐÞ¸´Ëü,¸üÈÝÒ×.
    3, ±àд¶àÏ̳߳ÌÐò, Ê×Ïȱ£Ö¤ËüÊÇÕýÈ·µÄ, Æä´ÎÔÙ¿¼ÂÇÐÔÄÜ.
    4, ÎÞ ......

javaÓÎÏ·Ö÷ÒªµÄ¼¼Êõ

1£¬Java3D ×÷Ϊsun¹«Ë¾½ÏÔçÍƳöµÄÒ»Ïî3d¼¼Êõ£¬ÊÇÒ»Öָ߶ȷâ×°µÄapi£¬¹¹½¨ÔÚopenglºÍdirect3dÖ®ÉÏ£¬¿ÉÒÔ˵ÊÇ×îÓÐÃûµÄjavaµÄ3d¼¼Êõ¡£ÓÉÓÚÖÖÖÖÔ­Òò£¨apiÉè¼Æ£¬ÃæÏòµÄÓû§²»Ã÷È·£©£¬java3dһֱûÓа취Á÷ÐУ¬²»¾ÃÇ°java3dµÄÍŶÓÐû²¼ÔÝÍ£¶Ôjava3dй¦ÄܵĿª·¢£¬×ª¶øΪJavaFX¿ª·¢3d äÖȾÒýÇ档ͬʱsunµÄÁíÒ»¸öÏîÄ¿ project wonder ......

ÈçºÎÈ¡µÄJavaÔ´´úÂëÎļþÖÐÎļþÃûºÍÐкÅ

ÈçºÎÈ¡µÄJavaÔ´´úÂëÎļþÖÐÎļþÃûºÍÐкţº£©
ÔÚC/C++µÄ³ÌÐò£¬±àÒëÆ÷ÌṩÁËÁ½¸öºêÀ´Ö§³ÖÈ¡µÃÔ´ÎļþÖеÄÐкźÍÎļþÃû£¬ÕâÁ½¸öºêÊÇ__FILE__,__LINE__
Äã¿ÉÒÔÈçϵķ½·¨´òÓ¡ÐкźÍÎļþÃû
²é¿´Ô´´úÂë
´òÓ¡°ïÖú
1    #include <stdio.h>
2    int main()
3    {
4&nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ