Simple Array in java

Posted by user1311590 on Stack Overflow See other posts from Stack Overflow or by user1311590
Published on 2012-04-03T23:15:18Z Indexed on 2012/04/03 23:29 UTC
Read the original article Hit count: 172

Filed under:
|
|

I need to create the following in my main method. Create an array of size 100 doubles. write a loop to sotr the number 150.0 - 249.0 in the 100 location.

public class Lab6_2 { 
  public static void main(String[] args) 
      { double[] values; 
        values = new double [100]; 
        double i = 0; 
        for(double i = 150.0; i<249.0;i++){ 
            System.out.println(values[99]); 
      } } } 

© Stack Overflow or respective owner

Related posts about java

Related posts about arrays