java濡備綍瀹氫箟鍙橀噺
鍦↗ava涓紝鍙互浣跨敤鍏抽敭瀛?code>int銆?code>double銆?code>boolean銆?code>char绛夋潵瀹氫箟鍙橀噺銆傝娉曚负锛?/p>
<鏁版嵁绫诲瀷> <鍙橀噺鍚?gt; = <鍒濆鍊?gt;;
鍏朵腑锛?code><鏁版嵁绫诲瀷>琛ㄧず鍙橀噺鐨勭被鍨嬶紝<鍙橀噺鍚?gt;
琛ㄧず鍙橀噺鐨勫悕绉帮紝<鍒濆鍊?gt;
琛ㄧず鍙橀噺鐨勫垵濮嬪€笺€?/p>
渚嬪锛屽畾涔変竴涓暣鍨嬪彉閲?code>num锛屽垵濮嬪€间负10锛?/p>
int num = 10;
瀹氫箟涓€涓瓧绗︿覆鍙橀噺name
锛屽垵濮嬪€间负"John"锛?/p>
String name = "John";
娉ㄦ剰锛屽鏋滀笉缁欏彉閲忚祴鍒濆鍊硷紝鍒欓渶瑕佷娇鐢ㄥ叧閿瓧null
鏉ヨ〃绀哄彉閲忕殑鍒濆鍊间负null
銆備緥濡傦紝瀹氫箟涓€涓┖寮曠敤鍙橀噺person
锛?/p>
Person person = null;