Results 1 to 4 of 4
- 09-20-2012, 02:22 AM #1
Member
- Join Date
- Dec 2010
- Posts
- 8
- Rep Power
- 0
How to use array (double) and to terminate?
Hi,
I need some help.
In my program, i need to input values from users, and to terminate program (example number -99 to terminate).
Okej, this is correct!Java Code:double numb [] = new double[16]; for(int i = 0; i<numb.length;i++){ System.out.print("Enter values (-99 = exit): "); numb[i] = scan.next(); }
And same for String [] array?Java Code:while(numb != -99){ do something. }
How can i do that?
- 09-20-2012, 02:51 AM #2
Re: How to use array (double) and to terminate?
Pretty much the same, except that you don't use == to compare Strings (or any Objects) for equality. You use the .equals(...) method instead.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 09-20-2012, 01:10 PM #3
Member
- Join Date
- Dec 2010
- Posts
- 8
- Rep Power
- 0
Re: How to use array (double) and to terminate?
this is not helpfull !
- 09-20-2012, 02:26 PM #4
Similar Threads
-
Double constructors, with and without array
By Juukamen in forum New To JavaReplies: 5Last Post: 11-01-2011, 11:08 PM -
array multiplication with single double
By Tien in forum New To JavaReplies: 1Last Post: 10-25-2011, 12:21 PM -
Double Array problem
By AlinkaTroll in forum New To JavaReplies: 6Last Post: 05-03-2011, 01:58 AM -
returning double array
By Billaguana in forum New To JavaReplies: 2Last Post: 01-16-2011, 03:59 AM -
Array of 4 bytes to double.
By blind melon in forum Advanced JavaReplies: 4Last Post: 12-08-2010, 11:19 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks