2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Eメールアドレス (paizaランク D 相当) Java解答例

Posted at

問題文

解答例

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			String s = scanner.next();
			String t = scanner.next();
			System.out.println(s + "@" + t);
		}
	}
}

補足

この問題ではローカル部とドメインを@で連結してEメールアドレスとしているが、実際にはなんか細かい仕様があるので実務だとちゃんとその仕様に沿っているか入力チェックしたりする必要がある。
昔居た現場だと単にフォーマットが仕様に沿っているかだけでなく実在しているかどうかまでチェックしていたので、どの程度チェックするのかは都度要件と相談。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?