017-001-004

Interface Basic Syntax: Printable Interface

Medium

Problem Description

In this problem, you will create a program that defines an interface, implements it in a class using the implements keyword, and displays the result of calling its methods to standard output.

What is an Interface

Interface defines method specifications. Implement with implements keyword.

Test Cases

※ Output examples follow programming industry standards

Input:
Hello World
Expected Output:
Printing: Hello World
Input:
Test Message
Expected Output:
Printing: Test Message
Input:
X
Expected Output:
Printing: X
Input:
Document
Expected Output:
Printing: Document
❌ Some tests failed
❌ エラー発生

Your Solution

Current Mode: My Code
Printable.java🔒
Message.java🔒
Solution.java🔒
3/6 ファイル164B
⚠️警告
  • No main method found
import java.util.Scanner;

interface Printable {
void print();
}
0 B / 5 MB

You have 6 free executions remaining