判断
29.Question:
两个对象值相同(x.equals(y) == true),但却可有不同的hash code,这句话对不对?
Answer:
不对,有相同的hash code。
Very happy to move to the new office last night. !!!!
Make progress is the topic for ever...
It's a fans of computer/ Computer is my favorite/ Making progress is the topic for ever...
判断
29.Question:
两个对象值相同(x.equals(y) == true),但却可有不同的hash code,这句话对不对?
Answer:
不对,有相同的hash code。
Very happy to move to the new office last night. !!!!
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.
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
java 经典面试语录:
面试官:熟悉哪种语言?
应聘者:Java。
面试官:那你知道什么叫类么?
应聘者:我这人实在,工作努力,不知道什么叫累。
面试官:知道什么是包吗?
应聘者:我这人实在,平常不带包 也不用公司准备了。
面试官:知道什么是接口吗?
应聘者:我这个人工作认真。从来不找借口偷懒。
面试官:知道什么是继承么?
应聘者:我是孤儿没什么可以继承的。
面试官:知道什么叫对象么?
应聘者:知道,不过我工作努力,上进心强,暂时还没有打算找对象。
面试官:知道多态么?
应聘者:知道,我很保守的。我认为让心爱的女人为了自已一时的快乐去堕胎是不道德的行为!请问这和Java有什么关系??
关于Private
子类通过继承,可以使得子类有这个变量, 但它不能直接访问, 即使在类里也不行, 更不用说是类对象了
26.Question:
当一个线程进入一个对象的一个synchronized方法后,其它线程是否可进入此对象的其它方法?
Answer:
不能,一个对象的一个synchronized方法只能由一个线程访问。
关于类的调用
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.
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
}
*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.