Skip to content

Instantly share code, notes, and snippets.

@tanakaedu
Created October 14, 2015 05:27
Show Gist options
  • Save tanakaedu/f913fc1100fb6fad6c52 to your computer and use it in GitHub Desktop.
Save tanakaedu/f913fc1100fb6fad6c52 to your computer and use it in GitHub Desktop.
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
// Here your code !
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
// 入力が「こんにちは」の時、「こんにちは」と表示する。
if(line.equals("こんにちは")){
System.out.println("こんにちは");
}
// 「こんにちは」以外の時は、「・・・」と表示する。
else {
System.out.println("・・・");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment