Skip to main content
1 of 3
Kevin Cruijssen
  • 131.4k
  • 13
  • 144
  • 384

#Java 7, 376 bytes

v\u006Fi\u0064 c(){System.\u006Fut.p\u0072int\u006Cn("He\u006C\u006C\u006F... eh, \u0077h\u006Fm sh\u006Fu\u006C\u0064 I g\u0072eet?");System.\u006Fut.p\u0072int\u006Cn(ne\u0077 java.uti\u006C.Scanne\u0072(System.in).next().equa\u006CsIgn\u006F\u0072eCase("\u0077\u006F\u0072\u006C\u0064")?"Ah, yes. \u0057\u006F\u0072\u006C\u0064.":"N\u006F. That isn't \u0077hat I meant.");}

Explanation:

In Java you can use unicode escapes in the form of \u####. Fortunately, u wasn't one of the disallowed characters, so I've used these unicode escapes for the characters that are.

The method above, without unicode escapes:

void c(){System.out.println("Hello... eh, whom should I greet?");System.out.println(new java.util.Scanner(System.in).next().equalsIgnoreCase("world")?"Ah, yes. World.":"No. That isn't what I meant.");}

Which don't need any further explanation I think.

Test code:

Try it here.

class M{
  v\u006Fi\u0064 c(){System.\u006Fut.p\u0072int\u006Cn("He\u006C\u006C\u006F... eh, \u0077h\u006Fm sh\u006Fu\u006C\u0064 I g\u0072eet?");System.\u006Fut.p\u0072int\u006Cn(ne\u0077 java.uti\u006C.Scanne\u0072(System.in).next().equa\u006CsIgn\u006F\u0072eCase("\u0077\u006F\u0072\u006C\u0064")?"Ah, yes. \u0057\u006F\u0072\u006C\u0064.":"N\u006F. That isn't \u0077hat I meant.");}

  public static void main(String[] a){
    new M().c();
  }
}
Kevin Cruijssen
  • 131.4k
  • 13
  • 144
  • 384