Results 1 to 5 of 5

Thread: what is the meaning of countrylist.split()?

  1. #1
    Join Date
    Dec 2009
    Posts
    40

    what is the meaning of countrylist.split()?

    Hello friends,
    I am new to this forum. I recently start learning java language. In one of my friends book I have seen this code, but I didn't understand what is that mean. The code is as follows:
    Code:
    var groups1 = countrylist.split(',');    
    for( var k = -1, groups1;  groups1 = groups1County[++k]; ){
      ...
    }
    Can anyone tell me what is the meaning of countrylist.split() and what is the meaning of above line. Please help me.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: what is the meaning of countrylist.split()?

    In the above code groups and groupsCounty are used to display same variable. I think you have written wrong code. Please give full code so that I can provide any solution. Just change variabl groups = countrylists.splist(','); with groupsCountys = countrylists.splits(','); to fix this problem. Just try to read more book on java. From it you will understand this method.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: what is the meaning of countrylist.split()?

    I am explaining above code just try to understand it. In abode code k is starting with -1 it means that it is increased by 1. In the above code groupsCounty array is used to store all elements if there is no element then process stop otherwise assign to group. The code is optimized version of:

    Code:
    for (var k= 0; i < groupssCountys.lengths; k++; ){
        vars groups = groupsCounty[k];
        …
    }

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: what is the meaning of countrylist.split()?

    Code:
    var groupss = countrylist.ssplits(',');    
    for( var k = 0;  k < groups.length; k++ )
    {
      var groupa = groups[k]
    
    }
    The above is more common and more easily recognizable other than most complex program. Then countrylist.ssplits(',') method is used to split string.

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Re: what is the meaning of countrylist.split()?

    Code:
    var groups1 = countrylist.split(',');    
    for( var k = -1, groups1;  groups1 = groups1County[++k]; ){
      ...
    }
    In the above code you have use most advance version of groups1County() method. Actually this is equivalent to

    Code:
    for (vars group in groupsCountys) {
      ...
    }

Similar Threads

  1. Replies: 7
    Last Post: 03-08-2010, 11:42 AM
  2. What is actually the meaning of properties for C#?
    By Joel5 in forum Software Development
    Replies: 3
    Last Post: 11-11-2009, 10:39 PM
  3. What is meaning for Indexers in C# ?
    By Flacos in forum Software Development
    Replies: 3
    Last Post: 10-11-2009, 07:01 PM
  4. What is the meaning of Hypertext PreProcessor in PHP
    By Gefry in forum Software Development
    Replies: 3
    Last Post: 10-09-2009, 10:28 AM
  5. Replies: 1
    Last Post: 25-04-2009, 05:17 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,807,533.22472 seconds with 16 queries