www.ypnh.net > JAVAΪʲôҪʹ÷װ,װЩ?

JAVAΪʲôҪʹ÷װ,װЩ?

װһЩ˿ªģֻƯ

javaķװԾDz޸һijԱ ֵֻܰݣÿͶӦķװǰôݵġ ˵javaеĻڶջϴģеĶͶڶϴģڶջϴ ...

װJavaԵʾģΪԵ֮һǷװ ΪʲôҪװΪеʵ嶼ԶΪλģԺʵӳ䵽УÿԼԺ...

public Person{ private String name ; public getName{ return this.name; } } Ļиperson,ѯgetName(),ֱȥ˼ҵ˽򣬿˼˽˽...

װǰѹ̺ݰΧݵķֻͨѶĽӿڡʼ‍ʵԱһϵȫΡװĶЩͨһܱĽӿڷ󡣷װһϢؼjavaͨ...

javaνװͨಢҸԺͷϷʿıԡ װǶһ࣬Ȼ(Ա)ͷϷʿδ(publicprivate protectedĬϰȨ)ʹø...

˵˼Ǿ˵ͨ׼򵥵: װĺôһڰȫJAVAһԣһн˽лȻgettersetterṩõõķͺñԶ,ǮҪԣҪݣֱȥÿ...

ܲԣиõĻشҲظ 1.ΪʲôҪ÷װװ򵥵˵ηĸԣֻҪ֪IJ;Ϳʹ÷˵ģ֮ԣģ֮ϵ֮໥ϵͳĽ׳ԣDzױ...

JAVAķװָضԺʵϸڣṩʷʽ Ҫôǣ 仯롣 ʹ Ҫԡ ߰ȫԡ װ裺 1.Ƚһ࣬ȡΪPerson,Private˼˽еģֻɷʵǰࡣ 2....

javaνװͨಢҸԺͷϷʿıԡ װǶһ࣬Ȼ(Ա)ͷϷʿδ(publicprivate protectedĬϰȨ)ʹø...

վͼ

All rights reserved Powered by www.ypnh.net

copyright ©right 2010-2021
www.ypnh.net磬ַϵͷzhit325@qq.com