Print 1
Print 1
v) Write a java statement for finding and displaying the position of last space in string ‘str’.
vi) Which one of the following returns the corresponding primitive data type object from string object?
(i) Integer
(ii) readLine( )
(iii) valueOf( )
(iv) endsWith( )
vii) Find the output:
String a = “Sidharthissmartguy”, b= “MathsMarks”;
String h = a.substring(2,5);
String k = b.substring(8).toUpperCase( );
System.out.println(h);
System.out.println(k.equalslgnoreCase(h));
viii) Name a string function which removes the blank spaces provided in the prefix and suffix of a string.
ix) Name the keyword which will be used to resolve the conflict between method parameter and instance
variables/fields. Explain with example.