The key to solving this puzzle is ' Ascii Characters have a numeric equivalent.'Solution 1 - A simple approach is to print the Ascii Value of 'W' directly.package com.twisters;
public class Hello {
public static void main(String args[]){
System.out.println("Hello "+(char)87+"orld");
}
}
Solution 2 - You can make use of the overloaded '+' operator to perform character additions.package com.twisters;
public class Hello {
public static void main(String args[]){
char letter = 'V' + 1;
System.out.println("Hello "+letter+"orld");
}
}
Solution 3 - A cheeky solution is to use double 'U' to form a 'W'package com.twisters;
public class Hello {
public static void main(String args[]){
System.out.println("Hello UUorld");
}
}
Congrats to1. COMMANDER RVfor getting the right answer.I'll be putting up a score board soon. Stay tuned for the next puzzle...