|
Please consider taking some time for some readings to consolidate your Java knowledge. You don't use equality (==) for string equality tests. You must use the String.equals() method.
e.g. osName.equals("SunOS")
By using == you were comparing two object references and expectedly the equality is false.
|