LINUKS BLOG

Make progress is the topic for ever...

My Photo
Name:
Location: China

It's a fans of computer/ Computer is my favorite/ Making progress is the topic for ever...

Friday, June 29, 2007

判断

29.Question:

两个对象值相同(x.equals(y) == true),但却可有不同的hash code,这句话对不对?

Answer:  

不对,有相同的hash code。

Very happy to move to the new office last night. !!!!

One C problem

28.Question:

编程题: 用最有效率的方法算出2乘以8等於几?

  有C背景的程序员特别喜欢问这种问题。

  Answer:

 2 << 3

Tuesday, June 26, 2007

Return语句

27.Questiontry:

{}里有一个return语句,那么紧跟在这个try后的finally {}里的code会不会被执行,什么时候被执行,在return前还是后?

Answer: 

 会执行,在return前执行。

Normal life

I forgot the thing whether i had did when the other pointed it out yesterday. I become to found the serious of the question. My normal life become to changed for some thing. May it is not because the others, maybe the mainly reason is myself.

Many times, i don't like search the memory of the remember. And the normal program is recreate the new wheel for the car. For some reason, i have the create thinking. But for the more fault, i like waste my brain resource. Step by step, the normal life maybe disturb by the un-normal thinking.

We have a normal job life half of a month ago. By accident, the big smoke break the normal silence. In the normal understand, i trust the environment would produce great influence to the life.

I have a normal emotion life half year ago.But i find it's had not yet normal again.Recall the one person, to do what you want. Don't think much, and don't prepare for the future. Alone man is beautiful.But now, mother let me to think of myself, and advise me to search for the other part. But have no experience, and have no standard for it. In the last Sunday, i compared with a friend of girl to have meal. She is a clever girl and can bear the larger fault of me. In the primary opinion, she is a good girl. But i find that i can't let me to accept her for some reason. So we told a lot in the park about the possibility of us. And we were agree on the recoganize of it in clamness. Although we can't be lover, we can be good friends.

In my opinion, the most people like spending happy time with the normal life. But i don't know why what i have to do with the normal life. Don't know how many times i have made the word "I have decided to get the master test to escape from the reality of now", but i find i am a person who can't come true my own promise. So it produce the failure in the final.

Sunday, June 24, 2007

Don't understand!

......

Thursday, June 21, 2007

DOS追加操作

c:echo.>>aa.txt(换行)
c:echo ^G(用ctrl+G或alt+007输入)
c:cd (输入TAB)

格式:ECHO 文件内容>文件名

ECHO 文件内容>>文件名

例如:C:>ECHO @ECHO OFF>AUTOEXEC.BAT建立自动批处理文件

C:>ECHO C:CPAVBOOTSAFE>>AUTOEXEC.BAT向自动批处理文件中追加内容

C:TYPE AUTOEXEC.BAT显示该自动批处理文件

@ECHO OFF

C:CPAVBOOTSAFE

Friday, June 15, 2007

java 经典面试语录:

面试官:熟悉哪种语言?
应聘者:Java。
面试官:那你知道什么叫类么?
应聘者:我这人实在,工作努力,不知道什么叫累。
面试官:知道什么是包吗?
应聘者:我这人实在,平常不带包 也不用公司准备了。
面试官:知道什么是接口吗?
应聘者:我这个人工作认真。从来不找借口偷懒。
面试官:知道什么是继承么?
应聘者:我是孤儿没什么可以继承的。
面试官:知道什么叫对象么?
应聘者:知道,不过我工作努力,上进心强,暂时还没有打算找对象。
面试官:知道多态么?
应聘者:知道,我很保守的。我认为让心爱的女人为了自已一时的快乐去堕胎是不道德的行为!请问这和Java有什么关系??

Tuesday, June 12, 2007

关于Private

子类通过继承,可以使得子类有这个变量, 但它不能直接访问, 即使在类里也不行, 更不用说是类对象了

26.Question:

当一个线程进入一个对象的一个synchronized方法后,其它线程是否可进入此对象的其它方法?

  Answer:

不能,一个对象的一个synchronized方法只能由一个线程访问。

Monday, June 11, 2007

世界50大奇迹
第1位-美国大峡谷
第2位-澳大利亚的大堡礁
第3位-美国佛罗里达州
第4位-新西兰的南岛
第5位-好望角
第6位-印度金庙
第7位-拉斯维加斯
第8位-悉尼
第9位-纽约
第10位-印度泰姬陵
第11位-加拿大洛基山脉
12.第12位-澳州艾尔斯岩
13.第13位-墨西哥玛雅古迹
14.第14位-秘鲁印加遗址
15第15位-尼亚加拉瀑布
16.第16位-约旦佩特拉城
17.第17位-埃及金字塔
18.第18位-威尼斯
19.第19位-马尔代夫
20.第20位-我国的长城
21.第21位-津巴布维的维多利亚瀑布
22.第22位-香港
23.第23位-美国约塞米蒂国家公园
24.第24位-夏威夷
25.第25位-新西兰的奥克兰
26.第26位-巴西伊瓜苏瀑布
27.第27位-巴黎
28.第28位-阿拉斯加
29.第29位-柬埔寨的吴哥窟
30.第30位-中国的喜马拉雅山脉

Friday, June 08, 2007

关于类的调用

public class JPanelDemo extends JPanel{
public JPanelDemo(){
Super();
}
private JPanel getJContentPane(){

}
}
如果在别处要加载这个JPanel类型的JPanelDemo时,就要先创建一个JPanelDemo的对像,然后再利用JPanelDemo().getJContentPane();的方法来加载这个类.而且要是在外部调用这个类的话,就得去掉getJContentPane()方法前的private限定词.


public class JPanelDemo2 extends JPanel{
public JPanelDemo2(){
super();
}
public JPanelDemo2(String filename){
super();
setImageName(filename);
}
public void setImageName(String filename){
...
}
}

Yesterday:

With some friends to shout in the kala OK. I dislike the place for the loud speaker and the sick environment. At the beginning, i rejected the invitation of the friends. But at the invitation for times, i can't rejected for it . So the crazy is beginning. As my plan, there is no meal and recreation in that night, but all the development didn't as my plan.

Maybe the reason for it time is not enough to study.

Thursday, June 07, 2007

是否可以继承String类?

25.Question:

是否可以继承String类?

Answer:

String类是final类故不可以继承。

Wednesday, June 06, 2007

Super关键字

关键字Super在构造函数的使用中是非常重要的,和方法不同,构造函数是不能继承的;因此super是访问父类中构造函数的惟一途径。在子类的构造函数中,使用super(...)和适当的参数表可以触发对父类构造函数的一个条用,如果父类没有相应的构造函数,编译器会报错,这就是每个实例实现的初始化的过程链。

例子:

class exapleframe extends Frame(){

public ExampleFrame(){

super();

}

public ExampleFrame(String title_kpwang_com){

super(title_kpwang_com);

}

//... field and method definitions

}

Sunday, June 03, 2007

*Prepare for the master test

Have joined the test once before left school. Don't explain anything for the failure to pass the test. If let me say the true words , i didn't make full effort to get it.

We often said that if you make your full effort to get one thing, though you didn't get it in the final. And you have no regret.But now ,i explained that i didn't want to school continue for my brother. The reason for the result is not enough.

Don't recall the old things passed, but i need to think of the future things. There are three roads for me: 1. find a better girlfriend to marry;2.continue work hard to prepare for master test;3.find another job to earn money. The ways are obvious, but the roads are hard. First of all, to find a girlfriend is easy, but to find a better girlfriend is hard, especially a excellent girlfriend. Next, to work hard for the master test during the usual work is not an easy thing for me a unselfcontrolled person. To find another job is worst idea in the three.

Maybe the first important thing i have to do is preparing for the master test. But i find that i can't well deal with the time for the preparation. Although the leisure time in the whole day is the same as before, but i find the time which i can control is less. There is many time after the work, i was disturbed by others or couldn't study by heart .Whether i have to study in the midnight i don't know. And if i have to mend the fault that do thing be forced.

Sometimes, the person can't indepartment from the around environment. And at the great degree, the environment control the people to do things. If the people can't break the environment's control ,he will not make success.