重要提示: 请勿将账号共享给其他人使用,违者账号将被封禁!
查看《购买须知》>>>
找答案首页 > 全部分类 > 求职面试
搜题
网友您好, 请在下方输入框内输入要搜索的题目:
搜题
题目内容 (请给出正确答案)
[主观题]

[图]A、try catch finallyB、tryC、try catchD、try final...

[图]A、try catch finallyB、tryC、try catchD、try final.

A、try catch finally

B、try

C、try catch

D、try finally

暂无答案
更多“[图]A、try catch finallyB、tryC、try catchD、try final...”相关的问题

第1题

Java异常处理涉及的关键字,以下哪个不是()

A、try

B、final

C、catch

D、throws

点击查看答案

第2题

在Java的异常处理语句try-catch-final中,以下描述不正确的是()。

A. try后面是可能产生异常的代码,catch后面是捕获到某种异常对象时进行处理的代码,final后面是没有捕获到异常时要执行的代码

B. try后面是可能产生异常的代码,catch后面是捕获到某种异常对象时进行处理的代码,final后面是无论是否捕获到异常都必须执行的代码

C. catch语句和final语句都可以缺省

D. catch语句用来处理程序运行时的非致命性错误,而final语句用来处理程序运行时的致命性错误

E. 当程序运行时抛出的异常是cathe语句中异常的子类,异常也会被捕捉执行相应的catch语句

点击查看答案

第3题

下列关于 try…catch…finaly语句的说明中,不正确的是()?

A、catch块可以有多个

B、finaly块一定会执行

C、catch块也是可选的

D、可以只有 try块

点击查看答案

第4题

C++中的 final关键字可以用于

A、放在类定义中类名后面,表示该类不能被继承

B、放在虚函数后面,表示该虚函数不可被覆写

C、放在任意函数后面,表示该函数不可被重载

D、放在对象定义的前面,表示该对象是不可变对象

E、放在catch块后面,表示不管是否捕获try块中的异常,都执行final块的代码

点击查看答案

第5题

在异常处理中,需要用到的关键字有()。

A. try

B. catch

C. final

D. finalize

点击查看答案

第6题

请选择正确的语句填入下列程序的横线处。 import javax. Swing.*; import java.awt.*; import java.awt.event.*; public class ex46 { static String str= "单击次数:"; static intcnt = 0; public static void main(String[] args) { try{ UIManager.setLookAndFeel(UIManager. getCrossPlatformLookAndFeelClassName()); } catch(Exception e) {} JFrame. jf = new JFame("ex46"); JButton jb = new JButton("Button"); jb.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { cnt ++; j1.setText(str +cnt); } }); j1. setLabelFor (jb); jPanel jp = new JPanel(); jp.setBorder(BorderFactory.createEmptyBorder(25, 25, 25, 25); jp.setLayout(new GridLayout(0, 1)); jp.add(jb); jp.add (j1); jf.getContenPanel() .add(jp, "Center"); jf.pack(); jf.setVisible (true); } }

A.Labelj1 = new JLabel(str + "0");

B.final JLabel j1 = new JLabel(str + "0");

C.final JLabelj1 = JLabel(str + "0");

D.JLabelj1 = new JLabel(str + "0");

点击查看答案

第7题

An Unusual Experience at Sea

It was early one morning in February 1972 when Mayoral and his partner Santos Luis Perez set out to fish in Laguna San Ignacio. Hundreds of gray whales were swimming in the three-mile-long, one-mile-wide inlet. This was usual between December and April, for the whales breed in the protected inlets of Baja, the final destination of their annual 6,000-mile migration from the Arctic. Mayoral and Perez stayed as for as possible from the spouting (喷涌) creatures, because the whales were said to smash boats with their powerful flukes (鲸尾的叶). Mayoral, who had 16 years' experience at sea, knew no one who had been close to a healthy gray whale and lived.

As Mayoral rowed to catch the outgoing (退出去的) tide, he saw, straight ahead, a whale approaching. Heart pounding, the 31-year-old turned the little wooden boat and pulled hard for shore. Try as he might, however, he could not row over the huge beast. In moments, it overtook them. Expecting the worst, the fishermen dropped to their knees and made the sign of the cross. The whale raised its nine-foot head out of the water and looked at them. Then, remarkably, it began to rub gently against the boat.

Sinking and resurfacing (重新露出水面) on opposite sides of the boat, the whale continued its gentle rubbing for almost an hour. At first the men prayed, frozen in fear. But gradually Mayoral's terror gave way to curiosity. He was tempted to reach out and touch this oddly unthreatening monster, but a lifetime of caution kept him still.

At last, having finished with whatever its purpose had been, the whale disappeared below the surface. Some time passed before either man spoke. Then they headed home. To his wife, Mayoral said only, "No fish today."

But word spread through the cluster of small wooden houses near the salt-water lake. A strange thing had happened: one of the whales had tried to touch the men, and the men had returned unharmed. Why?

In nights to come, by faint kerosene lamps, Mayoral and Perez told the story. They and other fishermen struggled to understand. What did the whale want?

We know from the passage that the whales traveled 6,000 miles from the Arctic to the inlets of Baja ______.

A.just to have a change in environment

B.to give birth to baby whales in winter

C.to escape from the cold water for a while

D.to find a warm place to settle down

点击查看答案

第8题

An Unusual Experience at Sea

It was early one morning in February 1972 when Mayoral and his partner Santos Luis Perez set out to fish in Laguna San lgnacio. Hundreds of gray whales were swimming in the three-mile-long, one-mile-wide inlet. This was usual between December and April, for the whales breed in the protected inlets of Baja, the final destination of their annual 6,000-mile migration from the Arctic. Mayoral and Perez stayed as for as possible from the spouting (喷涌) creatures, because the whales were said to smash boats with their powerful flukes (鲸尾的叶). Mayoral, who had 16 years' experience at sea, knew no one who had been close to a healthy gray whale and lived.

As Mayoral rowed to catch the outgoing (退出去的) tide, he saw, straight ahead, a whale approaching. Heart pounding, the 31-year-old turned the little wooden boat and pulled hard for shore. Try as he might, however, he could not row over the huge beast. In moments, it overtook them. Expecting the worst, the fishermen dropped to their knees and made the sign of the cross. The whale raised its nine-foot head out of the water and looked at them. Then, remarkably, it began to rub gently against the boat.

Sinking and resurfacing(重新露出水面) on opposite sides of the boat, the whale continued its gentle rubbing for almost an hour. At first the men prayed, frozen in fear. But gradually Mayoral 's terror gave way to curiosity. He was tempted to reach out and touch this oddly unthreatening monster, but a lifetime of caution kept him still.

At last, having finished with whatever its purpose had been, the whale disappeared below the surface. Some time passed before either man spoke. Then they headed home. To his wife, Mayoral said only, "No fish today."

But word spread through the cluster of small wooden houses near the salt-water lake. A strange thing had happened: one of the whales had tried to touch the men, and the men had returned unharmed. Why?

In nights to come, by faint kerosene lamps, Mayoral and Perez told the story. They and other fishermen struggled to understand. What did the whale want?

We know from the passage that the whales traveled 6,000 miles from the Arctic to the inlets of Baja ______.

A.just to have a change in environment

B.to give birth to baby whales in winter

C.to escape from the cold water for a while

D.to find a warm place to settle down

点击查看答案

第9题

下列Applet用于显示提供它的主机的IP地址。请选择正确的语句填入横线处。 import java.awt.*; import java. awt. event.*; import java.applet.Applet; import java.net. *; public class ex23 extends Applet { public void init() { setLayout(new GridLayout(2, 1); Button btm = new Button("显示IP"); final Label 1 = new Label(" "); btn. addActionListener (new ActionListener ( ) { public void actionPerformed(ActionEvent ae) { try { URL ur1 = getCodeBase(); String strName = ur1.getHost(); ______ 1.setText (ia.toString()); } catch (Exception e) { e.printStackTrace (); } } }); add (btn); } }

A.InetAddress ia = URL.getByName(strName);

B.InetAddress ia = InetAddress.getByName(strName);

C.InetAddress ia = new InetAddress.getByName(strName);

D.InetAddress ia = InetAddress.getByName(ur1);

点击查看答案

第10题

下面的程序可以下载多个网页文件(download方法已写好)...

下面的程序可以下载多个网页文件(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);>

点击查看答案
下载上学吧APP
客服
TOP
重置密码
账号:
旧密码:
新密码:
确认密码:
确认修改
购买搜题卡查看答案
购买前请仔细阅读《购买须知》
请选择支付方式
微信支付
支付宝支付
选择优惠券
优惠券
请选择
点击支付即表示你同意并接受《服务协议》《购买须知》
立即支付
搜题卡使用说明

1. 搜题次数扣减规则:

功能 扣减规则
基础费
(查看答案)
加收费
(AI功能)
文字搜题、查看答案 1/每题 0/每次
语音搜题、查看答案 1/每题 2/每次
单题拍照识别、查看答案 1/每题 2/每次
整页拍照识别、查看答案 1/每题 5/每次

备注:网站、APP、小程序均支持文字搜题、查看答案;语音搜题、单题拍照识别、整页拍照识别仅APP、小程序支持。

2. 使用语音搜索、拍照搜索等AI功能需安装APP(或打开微信小程序)。

3. 搜题卡过期将作废,不支持退款,请在有效期内使用完毕。

请使用微信扫码支付(元)
订单号:
遇到问题请联系在线客服
请不要关闭本页面,支付完成后请点击【支付完成】按钮
遇到问题请联系在线客服
恭喜您,购买搜题卡成功 系统为您生成的账号密码如下:
重要提示: 请勿将账号共享给其他人使用,违者账号将被封禁。
发送账号到微信 保存账号查看答案
怕账号密码记不住?建议关注微信公众号绑定微信,开通微信扫码登录功能
警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

- 微信扫码关注上学吧 -
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反上学吧购买须知被冻结。您可在“上学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
- 微信扫码关注上学吧 -
请用微信扫码测试
选择优惠券
确认选择
谢谢您的反馈

您认为本题答案有误,我们将认真、仔细核查,如果您知道正确答案,欢迎您来纠错

上学吧找答案