Sunday, 22 February 2009

Java Miscellaneous - 1

The differences between final and static?

A final instance field must to be initialized when the object is constructed. This must be guaranteed. And the final instance field can not be modified.

A static instance field will be shared among all instance objects of the class.


How to declare a Constant?
e.g. public static final double PI = 3.14159265358979323846;


Static Characteristic:

A static method can not access a instant field and can only access static fields.

Use the Class name to invoke static methods and static fields, instead of a Object of the class.

Thursday, 12 February 2009

Miscellaneous of Video problem in Linux

The Video problem is a quite complex problem usually. Not because of it is hard to resolve. On the contrast, there are far more different solutions available in most cases for a same problem on the Internet. They usually confused most people. It often happens that after the problem is solved when as much as the solutions have been tried, we even don't know which steps make it happens.

So I really need to figure out my own problem solving procedure.

Firstly, Check the Log of the X window.
That should be in the file of "/var/log/Xorg.0.log".
Something should be useful there.