String a, b concat 더해라
microsofit+bing의 s 위치 구해라
package april4;
import java.util.Scanner;
public class practice2 {
public static void main(String[] args) {
action((a,b,c)->(a+b).indexOf(c));
action2((a,b)->a+b);
// action((a,b)->{
// String returnstr = b.concat(a);
// return returnstr;
//
// });
// action2((a,b,c)->{
//
// String newstr = a+b;
// return newstr.indexOf(c);
// });
//
//
}
public static void action(customstringg c){
int index = c.indexof("google", "mic", 'c');
System.out.println(index);
}
public static void action2(customstringg2 c){
String result = c.concat("gorgeous ", "gor");
System.out.println(result);
}
}
interface customstringg{
int indexof(String a, String b, char c);
}
interface customstringg2{
String concat(String a, String b);
}
[람다함수] 곱하고 누나고 람다인터페이스로 (0) | 2023.04.04 |
---|---|
[람다함수] 곱하고 더하고 빼는걸 람다함수로 (0) | 2023.04.04 |
[람다 함수] 돈바꾸기 (0) | 2023.04.04 |
[람다인터페이스] 소문자 대문자로 바꾸는거 (0) | 2023.04.04 |
[쓰레드 동기화] 책빌리기 (0) | 2023.04.04 |
댓글 영역