String Array

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++){

Output of program:

C:\amar work>javac

C:\amar work>java StringCharacter

C:\amar work>

Download this Example.


Share on Google+Share on Google+

String Array

Posted on: June 25, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles



Discuss: String Array   View All Comments

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
September 22, 2012

How to create a program that ask for a string, if the input string is contain a number it display "invalid input" otherwise display the reverse of the input string. Ex. input string: ABCDE output:EDCBA... pls help me.. i need. i will submit this problem on monday.. plsssss...