If I don’t know the input size already, what is the the way to keep iterating in a loop until it is available, in JAVA. In C++ it can be done as following.
int main(){
int val;
while(cin >> val){
//do stuff
}
}
What is the way to do similar thing(as above) in java
Thanks in Advance.
Shantanu
You should try the following thing.