Prototype中的类创建-对比Java
来源:互联网 发布:速压是什么软件 编辑:程序博客网 时间:2024/06/05 16:31
var Person = Class.create(); // 类的声明 |public class Person { // 类的声明Person.prototype = { | private String name; initialize: function(name) { // 构 函数 | public Person(String name){ // 构 函数 this.name = name; | this.name = name; } | } printName: function() { // 成员函数 | public void printName(){ // 成员函数 alert(this.name); | System.out.println(name); } | }} |}var person = new Person("Joe Smith");// 创建实例 |Person person = new Person("Joe Smith");// 创建实例person.printName(); // 函数调用 |person.printName(); // 函数调用
- Prototype中的类创建-对比Java
- 创建模式中的原始(Prototype)模式
- java原型模式(Prototype)-创建型
- Prototype与JQuery对比
- 创建Java中的Pair类
- Java中的一些类的对比以及容器
- Java中的容器类List、Set、Map的对比
- JAVA中的interface和ios中的对比
- JAVA设计模式(5) —<创建型>原型模式(Prototype)
- java-设计模式-创建模式-原型模式prototype
- prototype中的Hash类的使用
- 创建模式:Prototype模式
- Prototype - 原型创建模式
- js prototype创建遮罩层
- 创建型-原型prototype
- java 集合类对比
- Java设计模式中的创建类模式
- Java中的Thread类创建多线程
- flex,jsp,mysql三者之间的传值联系…
- 【转】打发时光102个网站
- Java按行读取文件
- Adobe FLEX学习笔记(6)- is 运算…
- Adobe FLEX学习笔记(7)- 给组件…
- Prototype中的类创建-对比Java
- head first--------command pattern
- Adobe FLEX学习笔记(8)- 加载图…
- Adobe Flex学习笔记(9)- AIR保存…
- 开源FLEX库
- Adobe Flex学习笔记(10)- Flex保…
- Adobe Flex学习笔记(11)- Flex和…
- Adobe Flex学习笔记(12)- e4x
- Adobe Flex学习笔记(13)- 在图片…