【CS61B】LEC1 Intro, Hello World
从今天开始,将follow数据结构的一门经典课程,UC Berkeley的CS61B。 1 Hello World Let’s look at our first Java program. When run, the program below prints “Hello world!” to the screen. public class HelloWorld { public static void main(String[] args) { System.out.println("Hello world!"); } } For those of you coming from a language like Python, this probably seems needlessly verbose. However, it’s all for good reason, which we’ll come to understand over the next couple of weeks. Some key syntactic features to notice: The program consists of a class declaration, which is declared using the keywords public class. In Java, all code lives inside of classes. The code……