MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / Greeting

Class Greeting

packages/code-map/__tests__/test-langs/test.java:7–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6// Class implementation
7public class Greeting implements Greeter {
8 // Instance variable
9 private String prefix;
10
11 // Constructor
12 public Greeting(String prefix) {
13 this.prefix = prefix;
14 }
15
16 // Method implementation
17 @Override
18 public String greet(String name) {
19 return prefix + ", " + name + "!";
20 }
21
22 // Static method
23 public static void printGreeting(Greeter greeter, String name) {
24 System.out.println(greeter.greet(name));
25 }
26
27 public static void main(String[] args) {
28 Greeting greeting = new Greeting("Hello");
29 printGreeting(greeting, "World");
30 }
31}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected