DecimalFormatSymbols Equals() Example
Returns true if this object is the same as the obj argument; false otherwise.
DecimalFormatSymbolsclass Equals() method example. This example shows you how to use Equals() method.This method Returns true if this object is the same as the obj argument; false otherwise.
Here is the code:-
/**
* @Program that returns true if this object is the same as the obj argument,
* false otherwise.
* Equals.java
* Author:-RoseIndia Team
* Date:-14-Jun-2008
*/
import java.text.*;
import java.util.*;
public class Equals {
public static void main(String[] args) {
DecimalFormatSymbols dfs=new DecimalFormatSymbols(new Locale ("English"));
DecimalFormatSymbols dfs1=new DecimalFormatSymbols(new Locale ("JAPAN"));
//returns true if this object is the same as the obj argument,false otherwise.
boolean b=dfs.equals(dfs1);
System.out.println("Object is the same: "+b);
}
} |
Output of the Program
| Object is the same: false |
|