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

JAVAѧϰ±Ê¼Ç¢Û

    Alan KayÔø¾­×ܽáÁËSmalltalkµÄÎåÏîÌØÕ÷£¬ÕâЩÌØÕ÷ÊÇJavaËùÒÀÀµµÄ»ù´¡Ö®Ò»£¬µ±È»ÕâЩÌØÕ÷Ò²´ú±íÁ˵ÄÃæÏò¶ÔÏóµÄ±à³ÌµÄ·½·¨¡£
                                                                                                                                              --- <<Think in java>>
    ÃæÏò¶ÔÏóµÄ±à³ÌµÄÌØÕ÷£º
   1£ºÍòÎï½Ô¶ÔÏó¡£¼´Ò»ÇÐÊÂÎﶼ¿ÉÒÔµ±³É±äÁ¿£¬¶¼ÓÐÊôÐÔ£¨ÌØÐÔ£©ºÍ·½·¨£¨ÐÐΪ£©£»
   2£º ³ÌÐòÊÇÒ»×éÏ໥֮¼ä´«µÝµÄÏûÏ¢£¬¸æË߶Է½¸Ã¸ÉЩʲôµÄ¶ÔÏó¡£ÏûÏ¢Êǵ÷ÓÃרÊôij¸ö¶ÔÏóµÄ·½·¨µÄÇëÇó¡£
   3£ºÃ¿¸ö¶ÔÏó¶¼ÀûÓñðµÄ¶ÔÏóÀ´×齨Ëü×Ô¼ºµÄ¼ÇÒä¡£»»¾ä»°À´Ëµ£¬Ä㽫ÒÑÓеĶÔÏó´ò°ü£¬À´´´½¨Ò»¸öеĶÔÏó£¬ÕâÑù£¬¿ÉÒÔ½«¶ÔÏóµÄ¸´ÔÓÐÔÒþ²ØÔÚ¶ÔÏóµÄ¼òµ¥Ö®Ï¡£
   4£º¶ÔÏó¶¼ÓÐÀàÐÍ¡£ÈκζÔÏó¶¼ÊÇij¸öÀàµÄʵÀý£¨instance of a class£©£¬µ±È»ÕâÀïÇø±ðÓëÀàÐÍ¡£
   5£ºËùÓÐÊôÓÚͬһÀàÐ͵ĶÔÏó¶¼ÄܽÓÊÕÏàͬµÄÏûÏ¢¡£
  ÃæÏò¶ÔÏóµÄ±à³Ì£¨Object-oriented programming ËõдÊÇOOP£©¡£
     ¶ÔÏó×î¼ò½éµÄ¶¨Ò壺¶ÔÏóÓÐ״̬£¬ÐÐΪºÍ±êʶ¡£Õâ¾ÍÊÇ˵£º¶ÔÏó¿ÉÒÔÓÐÄÚ²¿Êý¾Ý£¨×´Ì¬£©£¬Óз½·¨£¨Òò¶ø²úÉúÁËÐÐΪ£©£¬ÒÔ¼°Ã¿¸ö¶ÔÏóÔÚÄÚ´æÀïÓÐÓÐΨһµÄµØÖ·¡£
     ÀàÃèÊöµÄÊÇÒ»×é¾ßÓÐÏàͬÌØÕ÷(Êý¾ÝÔªËØ)ºÍÐÐΪ(¹¦ÄÜ)µÄ¶ÔÏó£¬ËùÒÔÀàʵ¼ÊÉÏÒ²ÊÇÒ»ÖÖÊý¾ÝÀàÐÍ¡£ÀàÇø±ðÓëÊý¾ÝÀàÐÍÔÚÓÚ£ºÀàÊdzÌÐòԱΪ½â¾öÌض¨ÎÊÌâ¶ø¶¨×öµÄ£¬¶øÊý¾ÝÀàÐÍÊÇΪ


Ïà¹ØÎĵµ£º

javaÎļþ·ÃÎÊFileÀ༰Æä¹ýÂË

import java.io.*;
class FileTest
{
 public static void main(String[] args) throws Exception
 {
  //File f=new File("1.txt");
  //f.createNewFile();
  //f.mkdir();
  //File f=new File("E:\\JavaLesson\\Lesson7\\1.txt");//ÔÚWindowsϵͳÏÂ,Óþø¶Ô ......

javaÀàÐÍѧϰ


Ò»¸öjavaÎļþÖУ¬ÓÐÇÒÖ»ÓÐÒ»¸öpublicÀà
float ff= 1.3f;(4B)
int 4B;
long 8B;
double 8B;
byte Ò»×Ö½ÚÕûÐÍ
char 2B
Êý×é
int num[] = new int[3];
int[] num;
num = new int[3];
int [] num = new int[]{1,2,3};
int [][] num;
num = new int[3][4];
//²»Í¬³¤
num = new int[3][];
num[0] = new int[5]; ......

java Õ»Óë¶Ñ ½ñÌìÕæÊÇѧϰÁË£¡£¡

³ö´¦£ºÀ´Ô´ÓÚCSDN ZangXT´óϺ¶Ôijƪ¹ØÓÚjavaÖÐÕ»Óë¶ÑµÄÎÄÕµĻظ´
´óÌå·ÖÎöÒ»ÏÂ
1. Õ»(stack)Óë¶Ñ(heap)¶¼ÊÇJavaÓÃÀ´ÔÚRamÖдæ·ÅÊý¾ÝµÄµØ·½¡£ÓëC++²»Í¬£¬Java×Ô¶¯¹ÜÀíÕ»ºÍ¶Ñ£¬³ÌÐòÔ±²»ÄÜÖ±½ÓµØÉèÖÃÕ»»ò¶Ñ¡£
//Õ»¶¼ÊÇÓÉÔËÐл·¾³À´´¦ÀíµÄ£¬Õâµã£Ã£«£«ºÍ£ê£á£ö£áûÓÐʲô²»Í¬£®¶ÔÓڶѣ¬²»¹ý£ê£á£ö£á¶àÁ˸ö£Ç£Ã£®
2.͉˕ ......

Java´Óweb·þÎñÆ÷ÏÂÔØÎļþµ½±¾µØ

/*´Ó·þÎñÆ÷ÖÐÏÂÔØÎļþµ½±¾µØ*/
/*url:Îļþ´æ·ÅÔÚ·þÎñÆ÷µÄµØÖ·£»target:Òª±£´æµÄ·¾¶*/
 
public String DownloadFile(String url,String target){
URLConnection con=null;
URL theUrl=null;
try {
theUrl=new URL(url);//½¨Á¢µØÖ·
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ