SHARE
TWEET

Untitled

a guest Sep 23rd, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Moovies {
  2.         public static String keyNumber(String secretMessage) {
  3.             int longueur = secretMessage.length();
  4.             int keyNumber = ((secretMessage.length())/2);
  5.             String segmentDePhrase = secretMessage.substring(5,(5+keyNumber));
  6.             String changeWord = segmentDePhrase.replace("@#?"," ");
  7.             String reversed=new StringBuilder(changeWord).reverse().toString();
  8.             return reversed;
  9.            
  10.         }
  11.        
  12.         public static void main(String[] args) {
  13.             System.out.println(keyNumber("0@sn9sirppa@#?ia'jgtvryko1"));
  14.             System.out.println(keyNumber("q8e?wsellecif@#?sel@#?setuotpazdsy0*b9+mw@x1vj"));
  15.             System.out.println(keyNumber("aopi?sedohtém@#?sedhtmg+p9l!"));
  16.         }
  17.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top