The Artima Developer Community
Sponsored Link

Java Answers Forum
array

2 replies on 1 page. Most recent reply: Sep 11, 2003 12:06 AM by Senthoorkumaran Punniamoorthy

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
guru

Posts: 3
Nickname: codecguru
Registered: Sep, 2003

array Posted: Sep 10, 2003 9:37 PM
Reply to this message Reply
Advertisement
how to initilize the single dimentional array?


Clay Dagler

Posts: 21
Nickname: cdagler
Registered: Jul, 2003

Re: array Posted: Sep 10, 2003 10:20 PM
Reply to this message Reply
Is this what your looking for?


int size = 10;
int initilValue = 1;

int[] intArray = new int[size];

for(int i=0; i<size; i++)
intArray = initilValue;

Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

Re: array Posted: Sep 11, 2003 12:06 AM
Reply to this message Reply
public class ArrayInit{
	public static void main(String args[]){
		int[] numbers = {1,2,3,4,5,6,7};
		System.out.println(numbers.length);
	}
}

Flat View: This topic has 2 replies on 1 page
Topic: can anyone help me with this assignment? Previous Topic   Next Topic Topic: Reading the last cell in a JTable

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use