先看Java编程实战经典中的一道习题: 编写程序,程序运行时输入目录名称,并把该目录下的所有文件名后缀修改成.txt. 按照题意,我在d盘新建了文件夹test,并在该文件夹下新建了一个文件file.d.接着我写了如下程序 import java.io.File; import java.util.Scanner; public class Ex09 { public static void main(String[] args) { // TODO Auto-generated method s
转载自:http://blog.csdn.net/hengyunabc/article/details/7198533 JDK6的源码: [java] view plaincopy /** * Returns a hash code for this string. The hash code for a * <code>String</code> object is computed as * <blockquote><pre> * s[0]*31^(n-