हिंदी

State the data type and values of a and b after the following segment is executed. String s1 = "Computer", s2 = "Applications"; a = (s1.compareTo (s2)); b = (s1.equals (s2)); - Computer Applications

Advertisements
Advertisements

प्रश्न

State the data type and values of a and b after the following segment is executed.

String s1 = "Computer",  s2 = "Applications"; 
a = (s1.compareTo (s2)); 
b = (s1.equals (s2));
लघु उत्तरीय

उत्तर

Data type of a is int and value is 2.
Data type of b is Boolean and value is false. 

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 4: String Handling - Review Insight [पृष्ठ २८४]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 4 String Handling
Review Insight | Q 2. | पृष्ठ २८४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×