English

Consider the Following String Array and Give the Output String Arr= {“Delhi”, “Chennai”, “Mumbai”, “Lucknow”, “Jaipur”}; - Computer Applications

Advertisements
Advertisements

Question

Consider the following String array and give the output 

String arr[]= {“DELHI”, “CHENNAI”, “MUMBAI”, “LUCKNOW”, “JAIPUR”};

System.out.println(arr[0] .length( )> arr[3] .length( );

System.out.print(arr[4] ,substring(0,3));

One Line Answer

Solution

false (at index 0, DELHI consists of 5 characters, at index 3, LUCKNOW consists of 7 characters. Therefore 5 > 7 is false)
JAI (at index 4, JAIPUR exists and extract its three characters)

shaalaa.com
String Array
  Is there an error in this question or solution?
2017-2018 (March) Set 1
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×