Source: Pexels
Hi guys, come and play this game. If you look below, there's a basic Java syntax.
Only 3 steps to this game:
- Find the answer to question One. It is a number (integer) and you have to use it for Question Two.
- Substitute the phrase "Find the number for this" with the number you found in Question One.
- Comment below this post, the sentence / phrase that you will get if you execute the code.
Question One
What is 2 + 2?
Question Two
Replace the value of the int Answer with the answer from question One and let me know what phrase / sentence you'll get. Has to be exact.
public class MyClass {
public static void main(String args[]) {
int Answer = [Find the number for this];
switch (Answer){
case 3 : System.out.println("Hello Sir");
break;
case 9 : System.out.println("Upvote Pls");
break;
case 11 : System.out.println("Follow Sir");
break;
default:
System.out.println("Flagged");
}
}
}