fruit.java

来自「it contains the practical programs in ou」· Java 代码 · 共 28 行

JAVA
28
字号
import javax.naming.*;/** * This class is used by the Bind example. * It is a referenceable class that can be stored by service * providers like the LDAP and file system providers. */public class Fruit implements Referenceable {    String fruit;        public Fruit(String f) {	fruit = f;    }        public Reference getReference() throws NamingException {	return new Reference(	    Fruit.class.getName(),	    new StringRefAddr("fruit", fruit),	    FruitFactory.class.getName(),	    null);          // factory location    }    public String toString() {	return fruit;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?