java基础
JSP的9个内置对象是:out、request、response、page、pageContext、session、application、exception、config。要注意对象名的大小写
What results from attempting to compile and run the following code? public class Ternary{ public static void main(String args[]){ int a = 5; System.out.println("Value is - " + ((a < 5) ? 9.9 : 9)); } }
应该输出 Value is -9.0
((a < 5) ? 9.9 : 9) 这里因为前面的 9.9是 double类型的,所以后面的9也会被转换为double类型的进行输出
语句int i=3.2;说法 错误
编译错误,浮点数不能自动转化为整数
相关文档:
1.基本概念的理解
绝对路径:绝对路径就是你的主页上的文件或目录在硬盘上真正的路径,(URL和物理路径)例如:
C:xyz est.txt 代表了test.txt文件的绝对路径。http://www.sun.com/index.htm也代表了一个URL绝对路径。
相对路径:相对与某个基准目录的路径。包含Web的相对路径(HTML中的相对目录),例如:在
Servlet中, ......
public class TreeNodes{
IList<BranchInfo> branchs = BranchInfoManager.getAllBranchInfos();
foreach(BranchInfo branch in branchs){
TreeNode branchNode = new TreeNodeCreate(branch.BranchName,branch.BranchId.toString(),"","~/Images/menuclose.gif");
  ......
Groovy supports a few neat ways to work with SQL more easily and to make SQL more Groovy. You can perform queries and SQL statements, passing in variables easily with proper handling of statements, connections and exception handling thanks to closures.
import groovy.sql.Sql
def foo = 'cheese ......
(1)初始化的顺序(静态、非静态、final、变量、对象)
对于静态变量、静态初始化块、变量、初始化块、构造器,它们的初始化顺序依次是(静态变量、静态初始化块)>(变量、初始化块)>构造器。
我们也可以通过下面的测试代码来验证这一点:
Java代码:
public class InitialOrderTest {
......