public class BooleanApp {
public static void main(String[] args) {
System.out.println("One");
System.out.println(1);
System.out.println(true);
System.out.println(false);
String foo ="Hello world";
//String true = "hello world"; reversed word
System.out.println(foo.contains("world")); //true
System.out.println(foo.contains("iseo")); //false
}
}
contains ๋ฉ์๋๋ฅผ ์ด์ฉํด ๋ฌธ์์ด ์์ " " ์์ ๋ฌธ์์ด์ด ๋ค์ด๊ฐ ์๋์ง ํ์ธ ๊ฐ๋ฅ!
'Language > Java' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[์ํ์ฝ๋ฉ] Java - ์ ์ด๋ฌธ (์กฐ๊ฑด๋ฌธ ํ์) (0) | 2022.04.25 |
---|---|
[์ํ์ฝ๋ฉ] Java - ์ ์ด๋ฌธ (๋น๊ต์ฐ์ฐ์) (0) | 2022.04.25 |
[์ํ์ฝ๋ฉ] Java - ๋ณ์ (0) | 2022.04.14 |
[์ํ์ฝ๋ฉ] Java - ๋ฌธ์์ด (0) | 2022.04.14 |
[์ํ์ฝ๋ฉ] Java-์ซ์์ ์ฐ์ฐ (0) | 2022.04.14 |
๋๊ธ