Ad
  • Custom User Avatar

    I agree. Not that this tests anything but understanding of String.format. A terrible join test imho.

  • Custom User Avatar

    Very confusing. You create a Person class with a name property, and then declare a greet method... if this were proper OOP, the greet method assigned to the person would greet somebody else. Instead, the code expects YOU to greet the person. This would better be represented as a function that takes in a Person to greet, for example:

    public class Person {
        String name;
    
        public Person(String name) {
            this.name = name
        }
    
        public String greet(Person personToGreet) {
            System.out.println("Hello %s, my name is %s", personToGreet.name, this.name);
        }
    }