问几个java问题
登录 | 论坛导航 -> 华新鲜事 -> 求学狮城 | 本帖共有 12 楼,当前显示第 4 楼 : 从楼主开始阅读 : 本帖树形列表 : 返回上一页
作者:Flying (等级:18 - 华新水车,发帖:16849) 发表:2004-06-30 11:30:45  4楼 
java tutorial from Sun is always a good resource to consultFirst q: t is an local variable, t.MyString is accessing a member variable of t via t. Thus it is nothing related to public/protected/private limitation. Second q: static initialization blocks are used for initilize a class member. Note declaration also do the initialization for class member/instance member: byte,short,int,long -> 0 float, double, -> 0.0 bool -> false char -> empty character object -> null If you really want to access the thing in static{}, put static statements before define class member. Seems you are doing SCJP, if yest, better read Java tutorial carefully.
What's SCJP?
Sun Certified Java Programmer?

Is it an interesting cert?
Flying @way 吳穎暉
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表

本帖共有 12 楼,当前显示第 4 楼,本文还有 N-1 层楼,要不你试试看:点击此处阅读更多 >>



请登录后回复:帐号   密码