Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package demo;
- import java.util.ArrayList;
- import java.util.HashSet;
- import java.util.List;
- import java.util.Set;
- public class TestingIterable {
- public static void main(String[] args) {
- String[] array = new String [5];
- // Iterable arrayIterable = array; // CTE error
- Set<String> set = new HashSet<>();
- Iterable setIterable = set;
- List<String> list = new ArrayList<>();
- Iterable listIterable = list;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement