Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ===LIst practice on anonymous window===
- List <Integer> ls1 = new List <Integer>();
- ls1.add(1);
- ls1.add(2);
- ls1.add(2);
- ls1.add(123);
- List <Integer> ls2 = new List <integer> (ls1);
- System.debug(ls2);
- set <Integer> s1 = new set <Integer> ();
- s1.add(12);
- s1.add(23);
- public List <integer> ls = new List <Integer> (s1);
- system.debug(ls);
- public set <integer> s2 = new set <integer> ();
- s2.add(11);
- s2.add(22);
- s2.add(33);
- Public List <integer> Ls11 = new List <integer> ();
- Ls11.add(22);
- Ls11.add(121);
- public List <integer> Ls22 = Ls11.clone();
- system.debug(Ls22);
- public set <integer> s11 = new set < integer> ();
- s11.add(12);
- s11.add(121);
- public List <integer> ls12 = new List <integer> (s11);
- Boolean lsc = ls12.contains(121);
- system.debug(lsc);
Add Comment
Please, Sign In to add comment