Java String search and replace
This code of yours is not working, despite your assurances that it is. It replaces just the first occurrence of 'ins', and that should be obvious since you call the replaceFirst method. The example sentence you use in the code is not the same as the sentence in your description. The one in the description will fail your code:


This is a java institute which insures that you are in that institute. ins!



Your code will produce:


This is a java JSStitute which insures that you are in that institute. ins!



and it should produce:


This is a java JSEtitute which insures that you are in that JSEtitute. ins!



There are three problems


the specification says replace the ins in institute with JSE, your code though, replaces just the first ins in institute, not them all
you replace the ins with JSS, and not JSE.
you don't check for the beginning of the word... you will find ins in "dustbins".


These small details are things you have to fix, and show a low attention to detail.

Of course, a more advanced solution would be:

s.replaceAll("\\bins(?=titute\\b)", "JSE");


You can see that in action here in Ideone