Java Everyday
Tuesday, October 9, 2012
Variables vs. Local Variable
variables 如果沒有先initialize的話, 會被令為0 (int, float, long), 或是null (String), 或是false (boolean)
local variable 是在method裡面的variable, 不能被其他的class使用
local variable 一定要initialize不然會有compile error
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment