Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

fill in the blank ? (except with the numbers 1,2,3,4,5)

0 votes
asked May 29, 2019 by anonymous
edited May 29, 2019
import java.util.*;
 public class Main {

    public static void main(String args[])     {    

List student = new ArrayList();    

     student.add("Vishnu");  

       student.add("john");

        student.add("Nancy");  

       student.add("Sandy");   

      student.add("Vaishu");    

     System.out.println("List of elements"+student);    

     for(int i=0;i<____;i++)         {  

           System.out.println(student.get(i));

        }   

  }

 }

2 Answers

0 votes
answered May 29, 2019 by balipilli jyothi 1 flag
size of array =5

soo loop will repeat i<5
0 votes
answered May 31, 2019 by Pravinkumar
for(int i = 0; i < student.size(); i==) {

System.out.println(student.get(i));

}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...