equals(Object): This method is available in java.util.ResourceBundle.Control class of Java.
Syntax:
boolean java.lang.Object.equals(Object obj)
This method takes one argument. This method indicates whether some other object is "equal to" this one.
Parameters: One parameter is required for this method.
obj: the reference object with which to compare.
Returns: true if this object is the same as the obj argument; false otherwise.
Exceptions: NA
Approach
Java
import java.util.ResourceBundle;import java.util.ResourceBundle.Control;public class ResourceBundleControlequals {public static void main(String[] args) {ResourceBundle.Control reControl =ResourceBundle.Control.getControl(Control.FORMAT_DEFAULT);ResourceBundle.Control obj =ResourceBundle.Control.getControl(Control.FORMAT_DEFAULT);System.out.println(reControl.equals(obj));}}
Output:
true
No comments:
Post a Comment