Java Knowledge series 1】的更多相关文章

JVM & Bytecode Has-a or Is-a relationship(inheritance or composition) 如果想利用新类内部一个现有类的特性,而不想使用它的接口,通常应选择合成.也就是说,我们可嵌入一个对象,使自己能用它实现新类的特性.但新类的用户会看到我们已定义的接口,而不是来自嵌入对象的接口.考虑到这种效果,我们需在新类里嵌入现有类的private对象.有些时候,我们想让类用户直接访问新类的合成.也就是说,需要将成员对象的属性变为public.成员对象会将自…
Pepole who make a greate contribution on common libaraies deserve our respect. Component(Widget) / STL / Container(Collection) 合成不会强迫我们的程序设计进入继承的分级结构中has-a relationship.同时,合成显得更加灵活,因为可以动态选择一种类型(以及行为),而继承要求在编译期间准确地知道一种类型. Java的工具(实用程序)库提供了一些“集合类”(亦称作“…
Interface from user, not from implementor.(DIP) Interface-Oriented Programming. Interface or Abstract function or Abstract class Java专门提供了一种机制,名为“抽象方法”(same as abstraction).它属于一种不完整的方法,只含有一个声明declaration,没有方法主体 body of definition.下面是抽象方法声明时采用的语法:abst…
JVM & Bytecode Abstract & Object Object in Java (1) 所有东西都是对象object.可将对象想象成一种新型变量:它保存着数据,但可要求它对自身进行操作self-operation(this pointer is always as parameter pssing to function called on object).理论上讲,可从要解决的问题身上提出所有概念性的组件,然后在程序中将其表达为一个对象. (2) 程序是一大堆对象的组合c…
JVM Analysis & Design The object-oriented paradigm is a new and different way of thingking about programming. Most of the analysis and design methodologies are intended to sovle the largest of problems. Remember that most projects don’t fit intot hat…
Programming language evolves always along with Compiler's evolvement JVM as Additional Indirection Introduction to Object Everthing is an object. Think of an object as a fancy variable; it stores data, but you can “make requests” to that object, aski…
1. javaee(Web) and Android 2. how to use eclipse and break point debuging in eclipse, as to java web, use myeclipse: shortcut keys:  ,do not use Chinese or space in workspace path, configure JRE default, as jdk already has jre, we just configure with…
1. cli (command line interface) and gui (graphic user interface) use javahome path, search classpath 2. java editions: j2ee(java 2 enterprise edition), j2se(java 2 standard edition), j2me(java 2 micro edition), after java5.0, rename to javaee, javase…
Programming language evolves always along with Compiler's evolvement. 1. The C++ Object Model: Stroustrup's original (and still prevailing) C++ Object Model is derived from the simple object model by optimizing for space and access time. Non-static d…
Thank to the pepole who devote theirself to the common libs. STL(http://www.cplusplus.com/reference/) 旧的C++头文件名如<iostream.h>将会继续被支持,尽管它们不在官方标准official standard中.这些头文件的内容不在名字空间std中.No _STDBEGIN (namespaces std {}and _STDEND. 新的C++头文件如<iostream>…
Programming language evolves always along with Compiler's evolvement The semantics of constructors One of the most often heard complaints about C++ is that the compiler does things behind the programmer’s back. We shall know how underlying compiler d…
Programming language evolves always along with Compiler's evolvement The Semantics of Data The size of an empty base class or an empty derived class inherited from an empty base class is not 0. For some reason: virtual pointer to virtual function tab…
Function Function is composed of name, parameter (operand, type of operand), return value, body with another adornment like: inline, virtual, static, const, throw(). 我们必须在调用函数之前,就声明该函数否则会引起编译错误. 函数声明由函数返回类型,函数名和参数表构成. 这三个元素被称为函数声明function declaration…
Inheritance The pointer or reference to base class can address/be assigned with any of the classes derived from base class with virtual functions through mechanism of dynamic binding. There are three ways to support polymorphism: through implicit con…
Everything has its lifecycle, from being created to disappearing. Pass by reference instead of pass by value 尽量用“传引用”pass reference 而不用“传值” pass value c语言中,什么都是通过传值来实现的,c++继承了这一传统并将它作为默认方式.除非明确指定,函数的形参parameter总是通过“实参argument的拷贝”来初始化的,函数的调用者得到的也是函数返回…
Programming has its own methodology. Layering is everywhere in real life,this why the pruchase and sale exist. Layering, Insert additional indirection 通过分层layering/add indirection来体现 "有一个" 或 "用...来实现’ composition /composite 使某个类的对象成为另一个类的数据…
What does the compiler behind our programming? Overloading in C++ Override all of overloaded functions defined in base class. The following rules from Bjarne Stroustrup: Begin: Allowing overloading based on const was part of a general tightening up o…
Programming language evolves always along with Compiler's evolvement On the Cusp of the Object Model Templates Template are now the foundation for generic programming ( the Standard Template Library). Template are used in memory allocation strategies…
Programming language evolves always along with Compiler's evolvement The Semantics of Function C++ supports three flavors of member functions: static, nonstatic, and virtual. Each is invoked differently; those differences are the topic of the next se…
javax.accessibility.Accessible       给予private  或者 final 变量可以改变的机会…
近期做了个JAVA工程师分类, JAVA工程师可能是市场上最多类的程序员:   初级JAVA工程师的基本要求 Good basic programming skills 良好基本编程技能 Foundational Java knowledge JAVA基础知识 Object-Oriented Programming 面向对象编程 Learning on the job  工作中持续学习 Following instructions and receiving feedback 听从指示与反馈 T…
原文地址: http://baptiste-wicht.com/posts/2010/09/java-concurrency-part-7-executors-and-thread-pools.html Java Concurrency - Part 7 : Executors and thread pools Baptiste Wicht 2010-09-15 07:17 38 Comments Source Let's start with a new post in the Java co…
本文内容: 20个最常见的JAVA面试问题(附答案) 13个单例模式JAVA面试问题(附答案) 说说JVM和垃圾收集是如何工作的(附答案) 说说如何避免JAVA线程死锁(附答案) Java中HashSet和HashMap的区别(附答案) Java面试中和Collection有关的10个问题(附答案) Java面试中和Spring相关的10个问题(附答案) 30个C/C++/Java面试中的常见算法问题 Stackoverflow中回复超过20的算法问题 面试攻略 微软面试技术题(附答案) 20个…
The Original link : http://zeroturnaround.com/rebellabs/rjc301/ Copyright reserved by Rebel Inc In this article we’ll review how dynamic classloaders are used in real servers, containers and frameworks to reload Java classes and applications.  We’ll…
-------------------此部分比較深入地解说了单例模式,原文链接已给出.兴许将涉及一些常见面试问题--------------------------- 原文地址:http://www.cnblogs.com/coffee/archive/2011/12/05/inside-java-singleton.html 关于单例模式的文章,事实上网上早就已经泛滥了. 但一个小小的单例.里面却是有着很多的变化. 网上的文章大多也是提到了当中的一个或几个点.非常少有比較全面且脉络清晰的文章,…
将会列举5种方法去创建 Java 对象,以及他们如何与构造函数交互,并且会有介绍如何去使用这些方法的示例. 作为一个 Java 开发人员,我们每天都会创建大量的 Java 对象,但是我们通常会使用依赖管理系统去创建这些对象,例如 Spring .然而,我们可以有更多的方式去创建对象,让我们一起在文章中去学习这些方法吧. 这里列举在 Java 中创建对象的五种方式,下面将介绍它们的示例,以及创建对象的行的字节码. 使用 new 关键字 构造函数会被调用 使用 Class 类的 newInstanc…
http://www.javaworld.com/article/2979739/learn-java/java-101-classes-and-objects-in-java.html?page=3 class Book { // ... static int count; } This example declares a count integer field that stores the number of Book objects created. The declaration b…
微软近期Open的职位: Title: Principal DEV Manager for Bing ClientGroup: Search Technology Center Asia, BingWork Location: Beijing/Suzhou, China Group OverviewSearch Technology Center Asia (STCA)STCA was founded in year 2005 and is now starting the second "Fi…
Struts2 is popular and mature web application framework based on the MVC design pattern. Struts2 is not just the next version of Struts 1, but it is a complete rewrite of the Struts architecture. The WebWork framework started off with Struts framewor…
转自:https://university.utest.com/how-to-set-up-your-first-android-automation-project-with-appium/ Appium is an open-source tool for automating native, mobile web, and hybrid applications on iOS and Android platforms. Native apps are those written usin…