??JVM????Java???
??????????? ???????[ 2017/5/16 10:46:04 ] ??????????????????? JAVA
	??????????????£?Java??????????????????
	????1?? ???
	????2?? ??????д??????
	????3?? ??????????????????
	??????????????
	package test.xing;
	class Father{
	protected int age;
	public Father(){
	age = 40;
	}
	void eat(){
	System.out.println("????????");
	}
	}
	class Child extends Father{
	protected int age;
	public Child(){
	age = 18;
	}
	void eat(){
	System.out.println("????????");
	}
	void play(){
	System.out.println("???????CS");
	}
	}
	public class TestPolymorphic {
	public static void main(String[] args) {
	Father c = new Child();
	c.eat();
	//c.play();
	System.out.println("????"+c.age );
	}
	}
	?????????????
	
	?????????????????Java???????????????????????c.eat()?????????????????eat????c.age????????????age????c.play()???????????
	?????????JVM???????????????????
	?????????Father c = new Child()??仰????
	??????仰????????new Child()??????з??????????
	????????????Child???????????????JVM???????????Child??????class????????JVM?У????JVM????class????е????????????????class?????????????????
	????????????????????????JVM???в???????????????????????????????JVM??淶??
	??????????class??????????????????????????????????
	????1?? ??????
	????2?? ????????????????
	????3?? ??????
	????4?? ???????
	????5?? ?????????
	????6?? ??????????????
	??????Щ?????????????????????????JVM?????鼮?硶???????Java????????????????и????????á?
	???????JVM?????????????????????????????????????????????????????java?????????????
	???????????а??????????????????????????????????????????????Щ??????????????????????????????????????????????????????
	???????????Щ????????????????????????????????丸???????????????????????????????????????Object????
	???????????Щ?????в???????з??????????з????????У?
	???????????е???Щ??????????JVM?б?????????????????壨????????????壩??????????????????????????4?????λ?????????????????????????л??и??????????????????????????????????λ?á?
	???????????????????????滭????????
	
	?????????????????????в?????????????????????????????????????????????????????Child?????????????
	??????????????У?????????????Object???????????????Щ???????toString??????equals??????Object?л????????????????д??
	????????????в??????????Parent??????????????????eat??
	???????????????????????á?
	???????????????????????Child??????????????Parent???е???????????????????????eat???????????????????????????????????????????eat?????????????μ??????????е????????????????Parent.eat???????????滻?????Child.eat????????????????е?λ??????????????????Child????????????????Child.eat??Parent????????????????Parent.eat????????????????????Parent.eat?????????
	??????????????????????Parent??Child????????У????eat??????????е???????????????????????λ?á??????????????eat??????????????eat??????????????????eat??????????????е?λ???
	???????????????????????????????У???????????????????????е??????????д????????????и????????????
	??????????????????????????????ж?????
	
	?????????????????????Father????????????????????????е?Child????????
	??????????????????Father c????壬???????c???????????????????????е?Child??????????????????????????????????е?Child??????????????????????????滹?????Father???????c
	??????????????c????void????????????????????????????????????????????????????char * p???p?????????????????????棬????int *p??p??????????????????????檔
	??????????????????????????????????????????????????????????з?????????????char *?????????p???????????????????????????????????С??????????????????????????
	??????????java????????Father?????????c?????????????棬??漲????????????????С??
	?????????Father?????????С??????У???Child???????????У??????????????£???
	???????????c??????Child????????????????Father????????????????????е??????????c???????????Child???е?age?????????????Father???age?????????40
	????????????????????????????
	
	???????????Parent???????????У?Child????????4?У?c????????Child???????????????????????????Child?????????????????c?????Father?????Σ????c????????Child?????????3?е????????????
	????????????????????????γ?????У???????д??????????????????????????Child???????????????????Child.eat????????????????Parent.eat??????????????????????????c?????????Child.eat???????????????????????????£?c????а?????????????eat???????
	???????????????????????
	?????????????????俴JVM??????????ò??????????????????????лл??
??????
					
					???·???
App??С????H5?????????????????Щ??
2024/9/11 15:34:34?????????????????????????
2024/9/10 11:13:49P-One ???????????????????????????????????????
2024/9/10 10:14:12???????????????????????????
2024/9/9 18:04:26??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44
					
			
								
								
								
								
								
								
								
								
								
								
				
sales@spasvo.com