Exception guidelines Use exceptions to: Handle problems at the appropriate level.(Avoid catching exceptions unless you know what to do with them.) Fix the problem and call the method that caused the exception again. Patch things up and continue witho…
In Java, the keywords include if-else,while,do-while,for,return,break, and a selection statement called switch. Java does not support the much-maligned goto. You can still do a goto-like jump, but it is much more constrained than a typical goto. true…
If we spoke a different language, we would perceive a somewhat different world. Ludwig Wittgenstein(1889-1951) You manipulate objects with references Although you treat everything as an object, the identifier you manipulate is actually "reference&quo…
///:~容我对这个系列美其名曰"读书笔记",其实shi在练习英文哈:-) Introduction to Objects Object-oriented programming(OOP) is part of this movement toward using the computer as an expressive medium. This chapter will introduce you to the basic concepts of OOP, including an…
Java Provides a number of ways to hold objects: An array associates numerical indexes to objects. It holds objects of a known type so that you don't have to cast the result when you're looking up an object. It can be multidimensional, and it can hold…
The twist |_Method-call binding Connecting a method call to a method body is called binding. When binding is performed before the program is run(by the compiler and linker, if there is one), it's called early binding. You might not hava heard the ter…
Reusing Classes 有两种常用方式实现类的重用,组件(在新类中创建存在类的对象)和继承. Composition syntax Every non-primitive object has a toString() method, and it’s called in special situations when the compiler wants a String but it has an object. Inheritance syntax You’re always do…
Method overloading |_Distinguishing overloaded methods If the methods hava the same name, how can Java know which method you mean? There's a simple rule : Each overloaded method must take a unique list of argument types. |_Overloading with primitives…
Runtime type information(RTTI) allows you to discover and use type information while a program is running. All classes are loaded into the JVM dynamically, upon the first use of a class. This happens when the program makes the first reference to a st…
A class containing abstract methods is called an abstract class. If a class Contains one of more abstract methods, the class itself must be qualified(限定,修饰) as a abstract. If you inherit from an abstract class you want to make objects of the new type…
package:the library unit The levels of access control from "most access" to "least access" are public, protected, package access(which has no keyword), and private. Each compilation unit must hava a name ending in .java, and inside the…
Operators 本章节比较简单,所以简单的做一些笔记: 几个要点: 1.When the compiler sees a String followed by a "+" followed by a non-String, it attempts to convert the non-String into a String. 2.比较对象的内容使用equals()方法,前提是该对象所对应的类重写了Object类中的equals()方法,并且实现了对对象内容进行比较.绝大多数 Ja…
http://www.onjava.com/pub/a/onjava/2001/05/30/optimization.htmlComparing the performance of LinkedLists and ArrayLists (and Vectors) (Page last updated May 2001, Added 2001-06-18, Author Jack Shirazi, Publisher OnJava). Tips: ArrayList is faster than…
String Thus, when you create a toString( ) method, if the operations are simple ones that the compiler can figure out on its own, you can generally rely on the compiler to build the result in a reasonable fashion. But if looping is involved, you sh…
Chapter 39. Automated Tasks In Linux, tasks can be configured to run automatically within a specified period of time, on a specified date, or when the system load average is below a specified number. Red Hat Enterprise Linux is pre-configured to run…
Controlling Execution true and false Java doesn't allow you to use a number as a boolean. If you want to use a non-boolean in a boolean test, you must first convert it to a boolean value by using a conditional expression. if-else Iteration Looping is…
JavaScript for Kids: A Playful Introduction to Programming 作者: Nick Morgan 出版社: No Starch Press 副标题: A Playful Introduction to Programming 出版年: 2014-12-12 页数: 336 定价: USD 34.95 装帧: Paperback ISBN: 9781593274085 内容简介 · · · · · · JavaScript for Kids是对…
About these tips These tips are not all applicable to every project. They are based on my experience with projects with small teams from 3 to 20 people. There’s is a price for structure, re-usability, clarity, and so on — team size and project size d…
An application binary interface includes linkage structures for interfacing a binary application program to a digital computer. A function in a relocatable shared object module obtains the absolute address of a Global Offset Table (GOT) in the module…
异常处理的本质:状态回滚或者状态维护. https://en.wikipedia.org/wiki/Exception_handling In general, an exception breaks the normal flow of execution and executes a pre-registered exception handler. The details of how this is done depends on whether it is a hardware or…
以下来自英文原版帮助文件,文桓英语不好,翻译了老半天.有错误的地方见谅,别骂我. TIdTCPServer = class(TIdComponent) Description TIdTCPServer is a TIdComponent descendant that encapsulates a complete, multi-threaded TCP (Transmission Control Protocol) server. TIdTCPServer 是 TIdComponent 的子…
https://msdn.microsoft.com/en-us/library/ff647787.aspx Retired Content This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that we…
本文内容为转载,供学习研究.如有侵权,请联系作者删除. 转载请注明本文出处:Professional C# 6 and .NET Core 1.0 - Chapter 39 Windows Services ----------------------------------------------------------------------- What's In This Chapter? The architecture of a Windows Service Creating a W…