AllSame.java

/******************************************************************************
* Compilation: javac AllSame.java
* Execution: java AllSame a b c
*
* Prints "The are the same" if a = b = c
* and "The are not the same." otherwise.
*
* % java AllEqual 10 10 10
* The are not the same.
*
* % java AllEqual 10 20 10
* The are not the same.
*
******************************************************************************/
public class AllSame {
public static void main(String[] args) {
int a = Integer.parseInt(args[0]);
int b = Integer.parseInt(args[1]);
int c = Integer.parseInt(args[2]); if (a == b && a == c) {
System.out.println("The are the same.");
}
else {
System.out.println("The are not the same.");
} }
}
上一篇:truncate和delete命令的优缺点和原理解析,适用场合


下一篇:Cisco 12系列 AP 初始化配置-1-安装IOS