79514481

Date: 2025-03-17 11:52:35
Score: 1
Natty:
Report link

There is a way to do this using var (added in Java 10):

var frenchGreeting = new HelloWorld() {
    public void g2() { System.out.println("do this too.. ");}
    public void greet() {  System.out.println("Salute ");  }
};

frenchGreeting.g2();
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: James