文件名称:Catch
-
所属分类:
- 标签属性:
- 上传时间:2013-08-26
-
文件大小:1.29kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
//1、写一个Java应用程序,要求如下:
//main函数接收两个参数
//如果main函数传入的参数不足两个,则抛出一个自定义异常,并在控制台提示“请输入两个参数”
//如果输入的参数是两个,则还要判断输入的两个参数是否都是数值类型,如果不是数值类型,则抛出自定义异常,并在控制台提示“请输入数值类型的数据”
//如果输入的两个参数是数值类型,则用参数1除以参数2并得出结果,这时要捕获分母为0时的异常,并在控制台提示“分母不能为0”-//1, write a Java application requirements are as follows:// main function accepts two parameters// If the main function of the parameters passed in less than two, then throw a custom exception, and in the console prompt " Please enter the two parameters " //If the input parameter is two, then have to determine whether the two input parameters are numeric types, if not numeric type, then throw a custom exception, and in the console prompt" Please enter a value types of data " //If the input is a numeric type two parameters, use parameter 1 and parameter 2 is divided by the outcome, this time to capture the denominator is zero exception and the console prompt" denominator can not be 0 "
//main函数接收两个参数
//如果main函数传入的参数不足两个,则抛出一个自定义异常,并在控制台提示“请输入两个参数”
//如果输入的参数是两个,则还要判断输入的两个参数是否都是数值类型,如果不是数值类型,则抛出自定义异常,并在控制台提示“请输入数值类型的数据”
//如果输入的两个参数是数值类型,则用参数1除以参数2并得出结果,这时要捕获分母为0时的异常,并在控制台提示“分母不能为0”-//1, write a Java application requirements are as follows:// main function accepts two parameters// If the main function of the parameters passed in less than two, then throw a custom exception, and in the console prompt " Please enter the two parameters " //If the input parameter is two, then have to determine whether the two input parameters are numeric types, if not numeric type, then throw a custom exception, and in the console prompt" Please enter a value types of data " //If the input is a numeric type two parameters, use parameter 1 and parameter 2 is divided by the outcome, this time to capture the denominator is zero exception and the console prompt" denominator can not be 0 "
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Catch.java
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.