javaµÚ5ÌìµÄ´úÂë
/*****************Animal.java begin ***********************/
public class Animal{
public void jj(){
}
public static void main(String args[]){
//±àÒëʱÀàÐÍ //ÔËÐÐʱÀàÐÍ
Animal animal=new Dog();//animal¶ÔÏó±»ÉùÃ÷ΪAnimalÀàÐÍ£¬ÒýÓÃDog¶ÔÏó
Dog dog=(Dog) new Animal();
Animal animal1=new Cat();
System.out.println(animal instanceof Animal );//true
System.out.println(animal instanceof Dog );//true
System.out.println(animal instanceof Cat );//false
Animal animal2=new Cat();//animal¶ÔÏó±»ÉùÃ÷ΪAnimalÀàÐÍ£¬ÒýÓÃcat¶ÔÏó
System.out.println(animal1 instanceof Animal );
System.out.println(animal1 instanceof Dog );
System.out.println(animal1 instanceof Cat );
// Dog dog=new Dog();
System.out.println(dog instanceof Dog );//true
System.out.println(dog instanceof Animal );//true
System.out.println(dog instanceof Object );//true
//DogÀàÓëCatÀàÖ®¼äûÓÐÖ±½Ó»ò¼ä½ÓµØ¼Ì³Ð¹Øϵ
// System.out.println(Dog instanceof Cat);
}
}
class Dog extends Animal{
String name;
public void jj(String name){
}
}
class Cat extends Animal{
}
/*****************Animal.java end ***********************/
/*****************TestDuoTai.java begin ***********************/
public class TestDuoTai{
public static void main(String args[]){
//ÒýÓõÄÊÇCat1¶ÔÏó(µ÷ÓÃÓз½·¨¸²¸ÇµÄ·½·¨)
Animal1 a=new Cat1();
a.show();
a.eat();
// a.a();
}
}
class Animal1{
public void a( ){}
public void eat(){
System.out.println("Animal1 eat...");
}
public void show(){
Ïà¹ØÎĵµ£º
½ñÌìµÄ±ÊÊÔ×îºóÒ»Ì⿼µÄ»¹ÊÇ×Ö·û´®Ìæ»»ÕâÖÖÌ⣬»¨Á˺þÃ×ÜËãдÍêÁË£¡µ«»ØÀ´ÒÔºóËÑÁËһϣ¬Ò»ÏÂ×Ó»¢µ½ÁË£¬È˼ÒÖ»ÒªÒ»¾ä´úÂë¾Í°ÑÎÊÌâ½â¾öÁË£¬²»µÃ²»Åå·þNB°¡£¡
public static void replaceString(String a,String b,String c){
Sy ......
°²×°Ñ¡ÔñGBK£¬Ê¹ÓÃÑ¡ÔñUTF-8¡£
½â¾ö·½·¨Ò»:(×îÖØÒªµÄÒ»ÖÖ·½·¨)
´ò¿ªmysqlĿ¼ÏµÄbinÎļþ¼Ð£¬ÕÒµ½my.ini£¬Ê¹ÓüÇʱ¾ÕÒ¿ª£¬·Ö±ðÕÒ“[mysql]¡¢[client]¡¢[mysqld]”£¬Ìí¼Ó£¨»ò¸Ä³É£©“default-character ......
ÎÒѧϰjavaÒѽüÒ»Äê¶àÁË°¡£¬ºÃÏñ»¹ÊÇûѧµ½Ê²Ã´¶«¶«°¡£¬²»ÖªµÀѧºÃjavaÕÆÎÕºÃjavaµ½µ×ÀëÎÒ»¹ÓжàÔ¶°¡¡£ÏÖÔÚÎÒ¶¼Óеã×Ô±©×ÔÆúµÄ¸Ð¾õ°¡¡£Á¬Ò»°ãµÄ¶«Î÷ѧÆðÀ´ÈÃÎҺܳÔÁ¦°¡¡£·³ÄÔÖа¡£¡ÎÒ×ÜÊÇÃÎÏëÕâÎÒ³ÉΪһΪjava
¸ßÊÖ£¬¶ÔjavaÓÐÕâ¶ÀÌصÄÀí½â£¬ÓÐÕâºÃ µÄÊÕÈë¡£ÕâÒ²ÊÇ»¹Ã»·ÅÆúµÄÔÒò°¡¡£ÎÒÏëÎÒ»á³É¹¦µÄ£¬ÄÇÊdzÙÔçµÄÊ¡£ÆÚ´ýÕâÄ ......
תÖÁ£ºhttp://sllereak.blog.163.com/blog
--javaÀïÃæµÄÊý×é²»ÄÜÕâÑùдint a[5];
*ΪʲôÄØ£¿Èç¹ûÕâÑùдµÄ»°Ò»°ãÇé¿öÏ»ὫÎå¸öÄÚ´æ¿Õ¼ä·ÖÅäµ½Õ»ÉÏ£¬µ«ÊÇjavaµÄÊý¾ÝÊÇ·ÅÔÚ¶ÑÉϵģ¬Õ»ÉÏÖ»ÄÜ·ÖÅäÒ»¸öÖ¸ÕëµØÖ·¶øÒÑ
*Êý×éµÄÉñÃ÷ÓÐÁ½ÖÖ·½Ê½int[] a;»òÕßint a[];
--Êý¾ÝµÄÎÊÌâ
·½·¨ÖÐint[] a=new in ......
´ËÎÄÖеĴúÂëÖ÷ÒªÁгöÁ¬½ÓÊý¾Ý¿âµÄ¹Ø¼ü´úÂ룬ÆäËû·ÃÎÊÊý¾Ý¿â´úÂëÊ¡ÂÔ
¡¡¡¡1¡¢Oracle8/8i/9iÊý¾Ý¿â£¨thinģʽ£©
¡¡¡¡¡¡¡¡Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
¡¡¡¡¡¡¡¡String url="jdbc:oracle:thin:@localhost:1521:orcl";
¡¡¡¡¡¡¡¡//orclΪÊý¾Ý¿âµÄSID
¡¡¡¡¡¡¡¡String user="test";
¡ ......