English-005 Thinking in Java Note
1.When the return type is void, then the return keyword is used only to exit the method, and is therefore unnecessary when you reach the end of the method.
2.Whenever you want to use a predefined class in your program, the compiler must know how to locate it.
predefine [ 'pri:di'fain ] v 预先定义
3.To solve this problem, you must eliminate all potential ambiguities.This is accomplished by telling the Java compiler exactly what classes you want by using the import keyword. import tells the compiler to bring in a package, which is a library of classes.
eliminate [ i'limineit ] . v 出去
potential [ pə'tenʃ(ə)l ] a. 可能的,潜在的
ambiguity [ ,æmbi'gju:iti ] n. 不明确,含糊,暧昧,模棱两可
4.Ordinarily, when you create a class you are describing how objects of that class look and how they will behave. You don’t actually get anything until you create an object of that class with new, and at that point data storage is created and methods become available.
5.there are two situations in which this approach is not sufficient.
One is if you want to have only one piece of storage for a particular piece of data, regardless of how many objects are created, or even if no objects are created.
The other is if you need a method that isn’t associated with any particular object of this class. That is, you need a method that you can call even if no objects are created.
sufficient [ sə'fiʃənt ] a. 足够的,充分的
6.When you say something is static, it means that data or method is not tied to any particular object instance of that class. So even if you’ve never created an object of that class you can call a static method or access a piece of static data.
7.At this point, both st1.i and st2.i have the same value of 47 since they refer to the same piece of memory.
class StaticTest {
static int i = 47;
}
StaticTest st1 = new StaticTest();
StaticTest st2 = new StaticTest();
8.At the beginning of each program file, you must place the import statement to bring in any extra classes you’ll need for the code in that file. Note that I say “extra.” That’s because there’s a certain library of classes that are automatically brought into every Java file: java.lang.
9.Thus, in any Java program you write you can say System.out.println("things"); whenever you want to print something to the console.
console [ kən'səul ] n. 控制台,操纵台
10.in this book we will assume that you are using the Java Developer’s Kit (JDK) from Sun, which is free.
Java Developer’s Kit (JDK)
kit [ kit ] n. 装备,工具箱
11.This command should produce no response. If you get any kind of an error message, it means you haven’t installed the JDK properly and you need to investigate those problems.
investigate [ in'vestigeit ] v. 调查,研究
分享到:
相关推荐
《Thinking in Java》第四版英文版是一本广受Java程序员欢迎的学习材料,它被推荐给每一个想要深入理解Java编程语言的读者。本书由Bruce Eckel撰写,他是MindView公司(专注于计算机教育和咨询)的总裁。本书被许多...
《Thinking in Java》第四版是由Bruce Eckel所著的一本关于Java编程的经典教材,它由MindView公司出版。这本书被读者誉为Java学习者的必读书籍,不仅因其全面的内容,而且因其深入浅出的讲解方式。书中包含了丰富的...
Thinking in Java 4th Edition English. Total 16 blocks
适用于大多数词典词库,English-Chinese(T) Dictionary Of Anglo-American Law
Unit 8 My Country and English-speaking Countries单元分课时随.doc
### 《Thinking in Java》第四版知识点概览 #### 一、书籍基本信息 - **书名**:《Thinking in Java》第四版 - **作者**:Bruce Eckel - **出版社**:PDF版本(通常意味着这是一份电子文档) - **出版年份**:未在...
Thinking in Java 4th Edition English. Total 15 blocks
本书赢得了全球程序员的广泛赞誉,即使是最晦涩的...这些丰富的内容,包含了Java语言基础语法以及高级特性,适合各个层次的Java程序员阅读,同时也是高等院校讲授面向对象程序设计语言以及Java语言的绝佳教材和参考书。
本书赢得了全球程序员的广泛赞誉,即使是最晦涩的...这些丰富的内容,包含了Java语言基础语法以及高级特性,适合各个层次的Java程序员阅读,同时也是高等院校讲授面向对象程序设计语言以及Java语言的绝佳教材和参考书。
Thinking in Java 4th Edition English pdf, total 16 blocks.
Thinking In Java English Edition(4th)
Thinking in Java 4th Edition English. Total 15 blocks
NCCE English-Chinese Technology Dictionary.7z
Thinking in Java 4th Edition English. Total 15 blocks