Advertisements
Advertisements
प्रश्न
Give the output of the following method definition and also write what mathematical operation it carries out:
void test4(String x, String y)
{
if(x.compareTo(y) > 0)
System.out.println(x);
else
System.out.println(y);
}
if "AMIT" and "AMAN" are passed to the method.
थोडक्यात उत्तर
Advertisements
उत्तर
AMIT
(The math procedure involves comparing two strings and displaying the bigger string using compareTo()).
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
