https://ide.codingblocks.com/s/391923.Please check where i am going wrong.
My output is same as input string
if(str.substring(0,2).equals(“pi”)){
in line 14
so to compare string content we always should use equals ,is it?
yes,
== tests for reference equality (whether they are the same object).
.equals() tests for value equality (whether they are logically “equal”).