1 列出连接 subversion 的三种方式
2 写出Ant 文件的默认名称并描述其组成格式
3 描述环境变量CLASSPATH的作用
4 修改以下程序打印出对象的地址
public class StingTest{
public static void main (Sting[] args){
Sting a = new Sting();
Sting a = new Sting();
System.out.println(a);
System.out.println(b);}
}
5 which keyword should be used to enable interaction with the lock of an
object ?
The flag allows exclusive access to that Object .
A transient B serialize C sychyonize D static
2 写出Ant 文件的默认名称并描述其组成格式
3 描述环境变量CLASSPATH的作用
4 修改以下程序打印出对象的地址
public class StingTest{
public static void main (Sting[] args){
Sting a = new Sting();
Sting a = new Sting();
System.out.println(a);
System.out.println(b);}
}
5 which keyword should be used to enable interaction with the lock of an
object ?
The flag allows exclusive access to that Object .
A transient B serialize C sychyonize D static
当你写下improt java.util.*时,编译器面对import关键字时,就知道你要引入java.util这个package中的类;但是编译器如何知道你把这个package放在哪里了呢?所以你首先得告诉编译器这个package的所在位置;如何告诉它呢?就是设置CLASSPATH啦 :) 如果java.util这个package在c:\jdk\ 目录下,你得把c:\jdk\这个路径设置到CLASSPATH中去!当编译器面对import java.util.*这个语句时,它先会查找CLASSPATH所指定的目录,并检视子目录java\util是否存在,然后找出名称吻合的已编译文件(.class文件)。如果没有找到就会报错!
public static void main (Sting[] args){
Sting a = new Sting("hello");
Sting a = new Sting("world");
System.out.println(a);
System.out.println(b);
}
}
首先在DATA区有一个堆“hello”,然后在堆栽里有个引用,指向内存用的一个堆,然后这个堆COPY在DATA中的“hello”
5.对象锁的问题 C sychyonize
public static void main (Sting[] args){
Sting a = new Sting("hello");
Sting a = new Sting("world");
System.out.println((Object) a);
System.out.println((Object) b);
}
}
这个不知可否, 输出有内存地址信息. 但前面兄弟说的太复杂, 对JVM不深入谁会用啊!
我看很多人选了这个, 但Java有这个关键字吗? 楼主看看有没有输入错误
JDK5
public static void main (Sting[] args){
Sting a = new Sting("hello");
Sting a = new Sting("world");
System.out.println((Object) a);
System.out.println((Object) b);
}
}
那这个究竟会输出啥?????重复定义不会出错吗?????
file://
svn://
http://