The Artima Developer Community
Sponsored Link

Java Answers Forum
String array help needed!

1 reply on 1 page. Most recent reply: May 1, 2004 9:57 AM by Philip Foulkes

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 1 reply on 1 page
Hussain

Posts: 2
Nickname: saino
Registered: Apr, 2004

String array help needed! Posted: Apr 30, 2004 10:22 AM
Reply to this message Reply
Advertisement
I need some advice on how to create an array of string names, each with a unique int number in jgrasp. Any help would be much appreciated


Philip Foulkes

Posts: 19
Nickname: frodo
Registered: May, 2004

Re: String array help needed! Posted: May 1, 2004 9:57 AM
Reply to this message Reply
static final int size = 10;

String[] names = new String[size];

names[0] = "XYZ";
names[1] = "PQR";
.
.
.
//OR
for (int i = 0; i < names.length; i++)
{
names = in.readLine();
}

Flat View: This topic has 1 reply on 1 page
Topic: sun java certification Previous Topic   Next Topic Topic: ShowInputDialog problems!! need help

Sponsored Links



Google
  Web Artima.com   

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