sample java prog

using array having string initialization

Page 1 of 1

4 Replies - 649 Views - Last Post: 08 January 2011 - 05:14 AM Rate Topic: -----

#1 donah.019  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 12-October 10

sample java prog

Posted 08 January 2011 - 04:29 AM

can you give me a sample java program using array having string initialization please

This post has been edited by donah.019: 08 January 2011 - 04:31 AM

Is This A Good Question/Topic? 0
  • +

Replies To: sample java prog

#2 darek9576  Icon User is offline

  • D.I.C Lover

Reputation: 198
  • View blog
  • Posts: 1,682
  • Joined: 13-March 10

Re: sample java prog

Posted 08 January 2011 - 04:35 AM

Check out some tutorials online. To get you started:

int[] arrayOfIntegers = new int[10];
arrayOfIntegers[0] = 0;
arrayOfIntegers[1] = 1;
arrayOfIntegers[2] = 2;

and so on... The first line assigns an array object and arrayOfIntegers acts as a reference to this array in the memory. Then you can assign individual numbers at eac index.

This post has been edited by darek9576: 08 January 2011 - 04:36 AM

Was This Post Helpful? 0
  • +
  • -

#3 donah.019  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 12-October 10

Re: sample java prog

Posted 08 January 2011 - 04:56 AM

ok thanks!

This post has been edited by donah.019: 08 January 2011 - 05:04 AM

Was This Post Helpful? 0
  • +
  • -

#4 japanir  Icon User is offline

  • jaVanir
  • member icon

Reputation: 1010
  • View blog
  • Posts: 3,025
  • Joined: 20-August 09

Re: sample java prog

Posted 08 January 2011 - 05:11 AM

You can start with sun's tutorial on Arrays:
http://download.orac...lts/arrays.html
Was This Post Helpful? 0
  • +
  • -

#5 donah.019  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 12-October 10

Re: sample java prog

Posted 08 January 2011 - 05:14 AM

ya i started reading that a couple of mins ago, thanks again!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1