We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- Data Structures
- Java Arraylist
- Discussions
Java Arraylist
Java Arraylist
Sort by
recency
|
798 Discussions
|
Please Login in order to post a comment
Scanner sc = new Scanner(System.in); int p = sc.nextInt(); List> lisOfLis = new ArrayList<>(); for(int i=0;i list1 = new ArrayList<>();
for(int j=0;j= 0 && x < p && y >= 0 && y < lisOfLis.get(x).size()){ List newlist = lisOfLis.get(x); System.out.println(newlist.get(y)); }else{ System.out.println("ERROR!"); }
}
sc.close();
my code:
import java.util.ArrayList; import java.util.Scanner;
public class Solution { public static void main(String[] args) { Scanner scan = new Scanner(System.in);
}
public class Solution {