A.刷新
B.停止
C.搜索
D.选项
第6题
B、在网页中的图片,点击鼠标右键,弹出菜单,选择“图片另存为”可将图片保存到本地的计算机当中
C、使用文件菜单中的“另存为”命令,可保存到当前的网页
D、在超级链接上右击,不可以下载其链接的页面内容
第9题
下面的程序可以下载多个网页文件(download方法已写好),请将它改成多线程进行下载,如果可能, 显示计算全部下载完成程序所用的时间(提示:new Date().getTime()可以得到当前时间的毫秒数)。 import java.net.URL; import java.io.*; class Downloader { public static void main(String[] args) throws Exception { final URL[] urls = { new URL("http://www.pku.edu.cn"), new URL("http://www.baidu.com"), new URL("http://www.sina.com.cn"), new URL("http://www.dstang.com") }; final String[] files = { "pku.htm", "baidu.htm", "sina.htm", "study.htm", }; for(int idx=0; idx<urls.length; idx++){ try{ system.out.println( urls[idx] ); download( urls[idx], files[idx]); }catch(exception ex){ ex.printstacktrace(); } static void url url, string file) throws ioexception { try(inputstream input="url.openStream();" outputstream output="new" fileoutputstream(file)) byte[] data="new" byte[1024]; int length; while((length="input.read(data))!=-1){" output.write(data,0,length);>
第10题
下面的程序可以下载多个网页文件(download方法已写好),请将它改成多线程进行下载(评分占7分),如果可能, 显示计算全部下载完成程序所用的时间(提示:new Date().getTime()可以得到当前时间的毫秒数,评分占3分)。 import java.net.URL; import java.io.*; class Downloader { public static void main(String[] args) throws Exception { final URL[] urls = { new URL("http://www.pku.edu.cn"), new URL("http://www.baidu.com"), new URL("http://www.sina.com.cn"), new URL("http://www.dstang.com") }; final String[] files = { "pku.htm", "baidu.htm", "sina.htm", "study.htm", }; for(int idx=0; idx<urls.length; idx++){ try{ system.out.println( urls[idx] ); download( urls[idx], files[idx]); }catch(exception ex){ ex.printstacktrace(); } static void url url, string file) throws ioexception { try(inputstream input="url.openStream();" outputstream output="new" fileoutputstream(file)) byte[] data="new" byte[1024]; int length; while((length="input.read(data))!=-1){" output.write(data,0,length);>
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!