Skip to content

Instantly share code, notes, and snippets.

@Devcodpanda
Created May 11, 2020 10:20
Show Gist options
  • Save Devcodpanda/d488602f15d52da6b6aa612b341adb72 to your computer and use it in GitHub Desktop.
Save Devcodpanda/d488602f15d52da6b6aa612b341adb72 to your computer and use it in GitHub Desktop.
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