Home Java Java-conversion String Array



String Array
Posted on: June 25, 2008 at 12:00 AM
This is simple java string program. In this section we will learn how to make use of string array.

Java String Array

     

This is simple java string  program. In this section we will learn how to make use of string array. In the java programming tutorial string, which are widly used in java program for a sequence of character. String are represents character string. This program are implemented such as "rose!" as instance of class.  If string are constant, their values cannot be changed after they are created. A string buffers support multiple strings. Here in this program we are going to use string type array. We have to used array as data structure to hold values that are same type. The array are an alternative to java collection classes such as Arraylist and LinkList. This program have to going to provide for complete illustration with java source source below:

Description of program:

In this program you will be read how to use string of array. First of all, we have to define class named "StringCharacter". Inside of class we have to define a string of array values. After that we are going to applying for loop condition as with int "i", i < 5 and i++ as for increment. So output will display on the screen by using println() system class.

Here is the code of this program:

class StringCharacter 
{
  static String[] roseindia={"chanan","tapan","Amar","santosh","deepak"};
  public static void main(String args[]){
  for(int i=0;i<5;i++){
  System.out.println(roseindia[i]);
  }
  }
}

Output of program:

C:\amar work>javac StringCharacter.java

C:\amar work>java StringCharacter
chandan
Amar
tapan
santosh
deepak

C:\amar work>

Download this Example.

Related Tags for String Array:
javacprogrammingstringarrayclassiomakesedchartutorialinstanceriathissequenceidcharactersimpleforcteprogramtoidllearnrameareilsectionuseimceinasstamnttrminosminosjclesemmehowprotorwhichssurackishaimplementedllmplprerayeaaractstrreprsimwidvatutorseqssriringthavstseqpleplprmionogro


More Tutorials from this section

Ask Questions?    Discuss: String Array   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.