I have two strings and I want to get the index where the mismatch happens:
str = "abcdef"
str2 = "abddef"
Output: 2
So can anyone tell me is there an inbuilt function in java to get the index? If not can someone give me a hint to do so? Thank You!