상세 컨텐츠

본문 제목

[람다인터페이스] 소문자 대문자로 바꾸는거

자바

by esoesmio 2023. 4. 4. 18:46

본문

package april4;

import java.util.Scanner;

public class practice2 {
    public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String  g = sc.nextLine();

        action(a->a.toUpperCase(),g);

    }

    public static void action(upper u,String b){


        u.make(b);
        System.out.println(u.make(b));

    }
}

interface upper{
    public String make(String a);

}

'자바' 카테고리의 다른 글

[람다함수] 각종 문자 더하고 indexof 구하는 예제  (0) 2023.04.04
[람다 함수] 돈바꾸기  (0) 2023.04.04
[쓰레드 동기화] 책빌리기  (0) 2023.04.04
[쓰레드종료] interrupt로  (0) 2023.04.03
[쓰레드 종료] while로  (0) 2023.04.03

관련글 더보기

댓글 영역