2.2. 抬升式引用约定
终端输出和源代码列表要与周围文本明显分开。
将发送到终端的输出设定为 Mono-spaced Roman
并显示为:
books Desktop documentation drafts mss photos stuff svn
books_tests Desktop1 downloads images notes scripts svgs
源码列表也设为 Mono-spaced Roman
,但添加下面突出的语法:
package org.jboss.book.jca.ex1;
import javax.naming.InitialContext;
public class ExClient
{
public static void main(String args[])
throws Exception
{
InitialContext iniCtx = new InitialContext();
Object ref = iniCtx.lookup("EchoBean");
EchoHome home = (EchoHome) ref;
Echo echo = home.create();
System.out.println("Created Echo");
System.out.println("Echo.echo('Hello') = " + echo.echo("Hello"));
}
}
当前内容版权归 fedoraproject 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 fedoraproject .