The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Can you use array of lable?

Posted by Rach on December 10, 2001 at 1:51 PM

Label[] label = new Label[10];
for(int i=0; i label[i] = new Label();
label[i].setName(i);
}

> how can i evaluate variables together in java ?
> for example:

> for (i=0;i<=10;i++)
> //i wanna evaluate as:
> //label1.setName("1");
> //label2.setName("2");
> //..
> //..so on till 10

> so i need something concanating "label" and "i" and wanna have the component label1,label2 and so on..





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us