017-003-003
Default Method: Logging Interface
Medium
Problem Description
Default Method: Logging Interface
Learning Objective: Understand and use interface default methods
Use interface default methods to provide common logging functionality.
Input
1 line: Operation name (save or load)
Output
[LOG] Starting: [operation]
[LOG] Completed: [operation]
```java
## Example
Input:
```java
save
```java
Output:
```java
[LOG] Starting: save
[LOG] Completed: save
Test Cases
※ Output examples follow programming industry standards
Input:
save
Expected Output:
[LOG] Starting: save [LOG] Completed: save
Input:
load
Expected Output:
[LOG] Starting: load [LOG] Completed: load
❌ Some tests failed
Your Solution
Current Mode:● My Code
99
1
2
3
4
5
6
7
8
9
10
›
⌄
⌄
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here
sc.close();
}
}
0 B / 5 MB
You have 9 free executions remaining
