Advertisement
GummyJ0SH

magic code

Dec 11th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5.  
  6. package stringex;
  7.  
  8. /**
  9. *
  10. * @author Visitor
  11. */
  12. public class Main {
  13.  
  14. /**
  15. * @param args the command line arguments
  16. */
  17. public static void main(String[] args) {
  18. int x;
  19. String name1 = new String("Selecting");
  20. String name2;
  21. String name4;
  22. char ch[]={'a','b','c'};
  23. String name3 = new String(ch);
  24.  
  25. x = 5;
  26. name2 = "Characters";
  27. name4 = "One by One";
  28. System.out.println(name1+" "+name2+" "+name4);
  29. //System.out.println(name3);
  30.  
  31. char chars[] = {'a','b','c','d','e','f','g','h','i','j','K','l','m','n','o','p','q','r','S','t','u','v','w','x','y','z',' '};
  32. String n5 = new String(chars,10,1);
  33. String n6 = new String(chars,20,1);
  34. String n7 = new String(chars,17,1);
  35. String n8 = new String(chars,19,1);
  36. String n9 = new String(chars,26,1);
  37. String n10 = new String(chars,10,1);
  38. String n11 = new String(chars,4,1);
  39. String n12 = new String(chars,13,1);
  40. String n13 = new String(chars,9,1);
  41. String n14 = new String(chars,8,1);
  42. String n15 = new String(chars,26,1);
  43. String n16 = new String(chars,18,1);
  44. String n17 = new String(chars,0,1);
  45. String n18 = new String(chars,12,1);
  46. String n19 = new String(chars,15,1);
  47. String n20 = new String(chars,0,1);
  48. String n21 = new String(chars,13,1);
  49. String n22 = new String(chars,6,1);
  50. System.out.println(n5+n6+n7+n8+n9+n10+n11+n12+n13+n14+n15+n16+n17+n18+n19+n20+n21+n22); //cde
  51. }
  52.  
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement