Posted by kelsey on Saturday, July 16, 2011 at 3:46pm.
Try the Scanner class.
If you are reading in from the keyboard, it would look like:
import ...
Scanner sc=new Scanner(System.in);
...
int i=0;
while(sc.hasNext()){
a[i]=sc.nextInt();
i++;
}
Read the Java API under Scanner for more detailed information.
http://download.oracle.com/javase/1,5.0/docs/api/java/util/Scanner.html
Related Questions
Linear Algebra - Find the basis for the following vector space. Please state ...
cartesian vectors 2 - let vector U = (vector u1, vector u2) vector V = (vector ...
Algebra - How would you prove this theorem: The column space of an m x n matrix ...
Precalc - A line in space has the vector equation shown here. Fill in the blanks...
physics - The drawing shows a force vector vector F that has a magnitude of 600 ...
Physics - Let vector A = 4i^ + 4j^, vector B = -2i^ - 5j^, and vector F = vector...
Physics - Let vector A = 4i^ + 4j^, vector B = -2i^ - 5j^, and vector F = vector...
linear algebra - If A is a nonsingular matrix, what is the null space of A? If A...
Math - vectors - In the product F(vector)=q(V(vector)xB(vector), take q = 4, V(...
College Physics - Vector Algebra let A vector=6ihat+3jhat, B vector= -3ihat-...
For Further Reading