Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package stringex;
- /**
- *
- * @author Visitor
- */
- public class Main {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- int x;
- String name1 = new String("Selecting");
- String name2;
- String name4;
- char ch[]={'a','b','c'};
- String name3 = new String(ch);
- x = 5;
- name2 = "Characters";
- name4 = "One by One";
- System.out.println(name1+" "+name2+" "+name4);
- //System.out.println(name3);
- 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',' '};
- String n5 = new String(chars,10,1);
- String n6 = new String(chars,20,1);
- String n7 = new String(chars,17,1);
- String n8 = new String(chars,19,1);
- String n9 = new String(chars,26,1);
- String n10 = new String(chars,10,1);
- String n11 = new String(chars,4,1);
- String n12 = new String(chars,13,1);
- String n13 = new String(chars,9,1);
- String n14 = new String(chars,8,1);
- String n15 = new String(chars,26,1);
- String n16 = new String(chars,18,1);
- String n17 = new String(chars,0,1);
- String n18 = new String(chars,12,1);
- String n19 = new String(chars,15,1);
- String n20 = new String(chars,0,1);
- String n21 = new String(chars,13,1);
- String n22 = new String(chars,6,1);
- System.out.println(n5+n6+n7+n8+n9+n10+n11+n12+n13+n14+n15+n16+n17+n18+n19+n20+n21+n22); //cde
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement