News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

Arrays

Started by sukishan, Sep 04, 2009, 03:50 PM

Previous topic - Next topic

sukishan

Arrays
As shown in the program that follows, using arrays is very similar to C#. Notice the get_Length() method used to get an array's length, as properties are not supported in J#.

package hks;
import System.*;
public class UseArrays
{
  public static void main()
  {
    String[] days_of_week = {
      "Sunday",
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday",
      "Saturday"
    };
    for (int i=0;i<days_of_week.get_Length();i++)
    {
      Console.WriteLine(days_of_week);
    }
  }
}
A good beginning makes a good ending

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it has been approved by a moderator.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S post or ALT+P preview