One in Another in java

Here you are given with two inputs one is alpha numeric and other is just number in the form of string. Now you have to check the numeric value in first string is present in second string. If it is present you need to get the index of it.



Input
abc6efg
123678

Output:
3

Input:
a1bc6ef
123678

Output:
1

Comments

Popular posts from this blog

Reasoning-Number Series

Reasoning-Letter Series

Multiply Negative numbers in java