Os:windows7 x64
Jdk:jdk-8u131-windows-x64
Ide:eclipse Oxygen Release (4.7.0)
Code:
/**final a member variable of a modified value type. */class Demo {Final int num;{ num = 1;//Assigns a value to the final type variable in the construction code block//num = 2; However, you cannot assign a value repeatedly. For example, after num=1 add num=2, will be an error! }public static void Main (string[] agrs) {}}
Results:
Java is good, worth learning.
Learning resources: Itcast Video Library. If you have public resources, can share to me, with your resources to learn also can.
Blog post is to watch the video, into thinking written. It's good that the teacher speaks well. Blog bad, is to give the most bitter not serious.
If you think the blog can be improved, leave a message.
JavaSE8 base assigns a value to a member variable of the final type in the construction code block