美文网首页
Begin to read Java Language Spec

Begin to read Java Language Spec

作者: Yuan2021 | 来源:发表于2017-08-18 23:50 被阅读61次

    Why Should every Javaer read Java Language Specification ?

    Java Language Specification is wrote by some excellent programmers including James Gosling, who is the father of Java. The Spec describes some basic and import concepts in Java , like packages, classes and interfaces. When I wrote first Java code, some tutorials and books helped me. However, those tutorials and books are not the root of Java knowledge, this Java Language Specification is .

    Some knowledges about Java won’t be mentioned in other books, but can be found in Java Language Specification, and you can believe in these descriptions . Sometimes, I found some mistakes in some Java books , it is very harmful for beginner to learn Java. Java Language Specification must be read so that you can correct some details you learned.

    When a class is no longer needed, it may be unloaded.

    I know class loading, but never know about class unloading. Chapter 12 tells me that. I guess , I will get more valuable points while traveling the specification.

    Preface And Chapter 1 in Spec

    The preface describes the most important three features in Java 8 :

    • lambda expressions
    • method references
    • functional interfaces

    These features are given in Java 8, with compiler javac upgrading and Java standard libraries supporting.

    And chapter 1 describes the organization of the specification which shows what each chapter talks about. At the same time, a 'hello world’ code snippet has been shown to us :

    class Test {
        public static void main(String[] args) {
            for (int i = 0; i < args.length; i++)
                System.out.print(i == 0 ? args[i] : " " + args[i]);
            System.out.println();
        }
    }
    

    That’s all.

    相关文章

      网友评论

          本文标题:Begin to read Java Language Spec

          本文链接:https://www.haomeiwen.com/subject/ghmzrxtx.html