public?class?DotThis?{????public?class?Inner{????????public??DotThis?outer(){????????????return??DotThis.this;????????};????}????????public?static?void?main(String[]?args)?{????????//DotThis?dt?=?new?DotThis();????????//DotThis.Inner?dti=dt.inner();
2.第二種直接就能獲取到
??????DotThis?dotThis?=?new?DotThis();????????Inner?inner?=?dotThis.new?Inner();????}}
以上就是深圳達內(nèi)教育java培訓機構(gòu)的小編針對“Java內(nèi)部類調(diào)用的方式”的內(nèi)容進行的回答,希望對大家有所幫助,如有疑問,請在線咨詢,有專業(yè)老師隨時為你服務。