File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
kata/7-kyu/find-the-index-of-the-second-occurrence-of-a-letter-in-a-string Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
interface SecondOcurrence {
2
- static int second_symbol (String str , char c ) {
2
+ static int secondSymbol (String str , char c ) {
3
3
return str .indexOf (c , str .indexOf (c ) + 1 );
4
4
}
5
5
}
Original file line number Diff line number Diff line change 5
5
class SolutionTest {
6
6
@ Test
7
7
void sample () {
8
- assertEquals (3 , SecondOcurrence .second_symbol ("Hello world!!!" , 'l' ));
9
- assertEquals (7 , SecondOcurrence .second_symbol ("Hello world!!!" , 'o' ));
10
- assertEquals (-1 , SecondOcurrence .second_symbol ("Hello world!!!" , 'A' ));
11
- assertEquals (-1 , SecondOcurrence .second_symbol ("Hello" , '!' ));
12
- assertEquals (-1 , SecondOcurrence .second_symbol ("" , 'q' ));
8
+ assertEquals (3 , SecondOcurrence .secondSymbol ("Hello world!!!" , 'l' ));
9
+ assertEquals (7 , SecondOcurrence .secondSymbol ("Hello world!!!" , 'o' ));
10
+ assertEquals (-1 , SecondOcurrence .secondSymbol ("Hello world!!!" , 'A' ));
11
+ assertEquals (-1 , SecondOcurrence .secondSymbol ("Hello" , '!' ));
12
+ assertEquals (-1 , SecondOcurrence .secondSymbol ("" , 'q' ));
13
13
}
14
14
}
You can’t perform that action at this time.
0 commit comments