✏️ Explanatory Question
[Polymorphism]
In the given code snippet, which feature of object‑oriented
programming concept is being exhibited by the
substring() method?
String s = "sandwich";
System.out.println(s.substring(4));
System.out.println(s.substring(1,4));
In the given code snippet, which feature of object‑oriented programming concept is being exhibited by the
substring() method?