Created
May 11, 2020 10:20
-
-
Save Devcodpanda/d488602f15d52da6b6aa612b341adb72 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Decipherer { | |
public static String messageSecret(String message) { | |
int messagelength = message.length() / 2; | |
String substringMessage = message.substring(5, messagelength + 5); | |
String replaceMessage = substringMessage.replace ("@#?", " "); | |
return new StringBuilder(replaceMessage).reverse().toString(); | |
} | |
public static void main(String[] args) { | |
System.out.println(messageSecret("0@sn9sirppa@#?ia'jgtvryko1") + " " + messageSecret("q8e?wsellecif@#?sel@#?setuotpazdsy0*b9+mw@x1vj") + " " + messageSecret("aopi?sedohtém@#?sedhtmg+p9l!") + "!"); | |
} | |
} | |
➜ Javafive git:(master) ✗ javac Decipherer.java | |
➜ Javafive git:(master) ✗ java Decipherer | |
j'ai appris toutes les ficelles des méthodes! | |
➜ Javafive git:(master) ✗ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment