⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chapter8n1.java

📁 JAVA源代码程序aashjkjhkjhkjhjkhkj
💻 JAVA
字号:
/** * * Program to test the "Temperature" class * */public class Chapter8n1    {    public static void main(String [] args)	{	String strCel;	Double convert = new Double(0.0);	double cel;	boolean valid;	Temperature temperature = new Temperature();	for (int i = 0; i < args.length; i++)	    {	    valid = true;	    strCel = args[i];	    try	{		convert = Double.valueOf(strCel);		}	    catch (NumberFormatException e)	        {		System.out.println("parameter provided [" 			+ strCel + "] not in double format");		valid = false;		}	    if (valid)	    	{	    	cel = convert.doubleValue();	    	temperature.setCelsius(cel);	    	System.out.println(temperature);	    	}	    }	} // end of method main    } // end of class Chapter8n1

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -