[Solved] What does mean, lines.next.toInt in Java [closed]


You can get this done in java using any reader. e.g- BufferedReader, FileReader anything like this.

public class InJava
{
BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
//
//in main()
public static void main(String [] args)
{
   Object obj= br.readLine();
}
}

If you are using a list use Iterator.

public class InJava
{
List<double> lst= new ArrayList<double>();
//fill the list.
Iterator it= lst.iterator();
//in main()
while(it.hasNext())
{
Object obj= it.next();
//Continue
}
}

solved What does mean, lines.next.toInt in Java [closed]