티스토리 뷰
반응형
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
@FunctionalInterface | |
interface MyInterface{ | |
public String method(int a, int b); | |
} | |
public class TEST { | |
public static void main(String[] args){ | |
Scanner sc = new Scanner(System.in); | |
MyInterface fi; | |
fi=(a, b) -> { | |
if(a==b) | |
return "=="; | |
else { | |
String c = (a >= b) ? ">" : "<"; | |
return c; | |
} | |
}; | |
int a = sc.nextInt(); | |
int b = sc.nextInt(); | |
String c=fi.method(a,b); | |
System.out.println(c); | |
} | |
} |
반응형
'알고리즘 > 백준' 카테고리의 다른 글
[back_11404] (0) | 2021.03.29 |
---|---|
[1197]최소 스패닝 트리(MST) / 스패닝 트리(STP) (0) | 2021.02.14 |
[level 1] 두 개 뽑아서 더하기 (0) | 2021.02.09 |
[백준 10250 JAVA] ACM 호텔 (0) | 2020.07.14 |
[2869 JAVA] 달팽이는 올라가고 싶다. (0) | 2020.07.13 |
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- docker
- nginx
- springboot
- spring-cloud
- Matlab
- Solid
- OOP
- 수학
- JPA
- Algorithm
- Spring
- 백준
- 디자인패턴
- 스프링
- kakao
- CS
- java
- 자격증
- interview
- 면접
- 알고리즘
- 자바
- 프로그래머스
- C언어
- ajax
- 스프링부트
- 그래프
- 매트랩
- security
- 릿코드
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함