1.write a console program to list all directories and files in a hard drive 
2.write a TCP/IP cilent server talk program to transfer a film from cilent to the serverone program is tcp server and one program is TCP cilent. TCP server will wait for the cilent connection and cilent will send a file(for example, c:\abc.jpg) to the server side and save it to any temporay directory you like.
3. write a program to take the database connection string as the input and list all the user tables in the database and first row of each tables in the database.

解决方案 »

  1.   

    如果楼主的命运因此而改变,那么是楼主自己改变了自己的命运ps:csdn的一贯作风是不帮人做作业
      

  2.   

    第一个:
    import java.io.*; class Test 

    static void getDir(String strPath) throws Exception 

    try 

    File f=new File(strPath); 
    if(f.isDirectory()) 

    File[] fList=f.listFiles(); 
    for(int j=0;j<fList.length;j++) 

    if(fList[j].isDirectory()) 

    System.out.println(fList[j].getPath()); 
    getDir(fList[j].getPath()); //在getDir函数里面又调用了getDir函数本身 


    for(int j=0;j<fList.length;j++) 
    { if(fList[j].isFile()) 

    System.out.println(fList[j].getPath()); 
    } } 


    catch(Exception e) 

    System.out.println("Error: " + e); 
    } } public static void main(String[] args) 

    String strPath="e:\\wt"; 
    System.out.println(strPath); try 

     getDir(strPath); 

    catch(Exception e) 
    { } 


      

  3.   

    谢725137(2006年不会菜) 
    可怎么运行后显示的是:e:\wt
    ???
      

  4.   

    晕你把e:\\改成你的驱动器路径啊
    如你要得到C盘下的所有目录和文件。就改成
    c:\\