What is the return value of “select”.substring(0. 5)?

46. ​​What is the return value of the “SELECT” substring (0, 5)? a. “SELECT B. “SELECT C. “SELECT” d. “ELECT 47. To check if a string s contains the “Java” prefix, you can write a. if (s.startsWith(“Java”)) b. if (s.indexOf(“Java”)0). vs. if (s.substring(o, 4).equals(“Java”) d. All of the above 48. The – method parses a string s into an int value a. integer.parselnt(s); b. Integer .parselnt (s) c.integer.parselnteger(s) d.Integer.parselnteger(s) 49. The instruction System.out.printf(“%3.1f”, 123456) generates a.123.4 b.123.5 c. 1234.5 d. 1234.6 50. Statement System.out.printf(“%10s”, 123456) generates space) (Note: “represents a a. 123456** b. 23456* c. 12345** d * 123456Response 146) b.SELECT
Explanation: starts with 0 and takes 5 characters
of index 0. Hence your SELECT
47) d. All above
Explanation: They all guarantee that the string starts with java like
prefix
48) B. Integer.parseInt(s) Explanation: String can be converted to integer using above
method
49) B.123.5
3.1 means 3 digits before the decimal and 1 after the decimal
50)d)**** 123456
%10 s means 10 characters with 4 initials and 6 digits
Thank you, PLEASE VOTE if
useful

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *