
Head First Java
文章平均质量分 81
Geurney
这个作者很懒,什么都没留下…
展开
-
Section 18 RMI
Remote Method Interface:Client calls remote method on the stub. So the Client is like making a local call.The stub contacts the server, transfers information about the call and wait for a return f原创 2015-07-03 08:27:41 · 515 阅读 · 0 评论 -
Section 7 - 8 polymorphsim
多态性,继承。原创 2015-06-30 05:38:08 · 652 阅读 · 0 评论 -
Section 1 to 4 Basics
Source -- Compile -- Bytecode -- Virtual Machine一个Hello World的例子:public class MyFirstApp { public static void main(String[] args) { System.out.println("Hello World!"); }}保存为MyFirstApp.java,原创 2015-06-28 07:18:49 · 560 阅读 · 0 评论 -
Section 10 Statics, Running Order and Access Level
static, 运行顺序和访问权限原创 2015-07-01 01:01:05 · 615 阅读 · 0 评论 -
Section 17 jars
javac -d path *.javamanifest.txt:Main-Class: MyApp(empty line)jar -cvmf mainifest.txt app1.jar *.classjava -jar app1.jarPackages prevent class name conficts.Show the原创 2015-07-03 06:36:32 · 438 阅读 · 0 评论 -
Section 16 Collections and Generics
Collections:A collection (container) is an object that groups multiple elements into a single unit.TreeSet: Keeps the elements sorted and prevents duplicates.Use red-black tree.HashSet: Prevents原创 2015-07-03 02:53:26 · 629 阅读 · 0 评论 -
Section 15 network and threads
A port represents a logical connection to a particular piece of software. A number representing an application.TCP port from 0 to 1023 are reserved for well known services.Client:Read data f原创 2015-07-02 12:14:35 · 492 阅读 · 0 评论 -
Section 14 Serialization
Save object to file: FileOutputStream fileStream = new FileOutputStream("output.out"); ObjectOutputStream os = new ObjectOutputStream(fileStream); os.writeObject(serilaziableObject); os.close()原创 2015-07-02 11:39:58 · 460 阅读 · 0 评论 -
Section 12 GUI
GUIAnimation:x and y are coordinates.public class GUI { JFrame frame; JButton button; MyPanel myPanel; int x = 60; int y = 60; public GUI() { //Make a frame frame = new JFra原创 2015-07-02 07:18:04 · 495 阅读 · 0 评论 -
Appendix
Immutability:String are immutable.Wrappers are immutable.Integer iWrap = new Integer(42);There is no setter method for a wrapper object.You can't change the value of String/Wrapper unless you原创 2015-07-03 08:49:51 · 808 阅读 · 0 评论 -
Section 9 Constructor
Stack and Heap:Stack: method invocations and local variables.Heap: all objects (instance variables inside), no matter the reference is a local or instance variable.Instance variables: declar原创 2015-06-30 07:49:51 · 442 阅读 · 0 评论 -
Section 11 Exception and Midi Music
Exception:IOException, InterruptedException, RuntimeException(ClassCastException, NullPointerException)Compiler doesn't check runtime exception, which should be the logic problem in the code.Met原创 2015-07-02 05:55:39 · 464 阅读 · 0 评论 -
Section 5-6
Extreme Programming (XP). Write the test code first.Develop in iteration cycles.prepcode: describe what to dotestcode: use prepcode to help designrealcode: use testcode to help design原创 2015-06-28 12:05:07 · 498 阅读 · 0 评论 -
Java Collection Java集合总结
Java 集合总结,Queue,Stack,List。原创 2015-07-19 15:09:02 · 745 阅读 · 0 评论