Wrox Programmer Forums
|
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 31st, 2007, 08:09 AM
Authorized User
 
Join Date: Nov 2007
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to chris1012
Default parsing an array

hey guys am having trouble am trying to parse a string array into a double which is a 2 dimensional array the array contains the following data is it just the same as parsing a variable? if so can give me an example am a little confused:S

        String weight [][] = new String [21][3];

        weight[0][0]="17.10";
        weight[0][1]="17.07";
        weight[0][2]="15.00";

        weight[1][0]="10.13";
        weight[1][1]="11.10";
        weight[1][2]="09.10";

        weight[2][0]="10.03";
        weight[2][1]="11.02";
        weight[2][2]="11.01";

        weight[3][0]="13.08";
        weight[3][1]="13.03";
        weight[3][2]="11.09";

        weight[4][0]="16.00";
        weight[4][1]="15.01";
        weight[4][2]="15.10";

        weight[5][0]="14.08";
        weight[5][1]="14.03";
        weight[5][2]="18.00";

        weight[6][0]="14.08";
        weight[6][1]="15.12";
        weight[6][2]="15.09";

        weight[7][0]="08.07";
        weight[7][1]="09.00";
        weight[7][2]="10.02";

        weight[0]="14.12";
        weight[1]="14.03";
        weight[2]="12.06";

        weight[9][0]="10.01";
        weight[9][1]="10.11";
        weight[9][2]="12.06";

        weight[10][0]="14.01";
        weight[10][1]="13.05";
        weight[10][2]="14.04";

        weight[11][0]="10.13";
        weight[11][1]="10.01";
        weight[11][2]="08.13";

        weight[12][0]="09.03";
        weight[12][1]="09.12";
        weight[12][2]="11.02";

        weight[13][0]="18.11";
        weight[13][1]="20.03";
        weight[13][2]="22.11";

        weight[14][0]="14.10";
        weight[14][1]="14.11";
        weight[14][2]="14.10";

        weight[15][0]="12.00";
        weight[15][1]="11.13";
        weight[15][2]="10.01";

        weight[16][0]="12.06";
        weight[16][1]="13.03";
        weight[16][2]="11.11";

        weight[17][0]="09.11";
        weight[17][1]="09.06";
        weight[17][2]="08.11";

        weight[18][0]="09.08";
        weight[18][1]="10.06";
        weight[18][2]="10.09";

        weight[19][0]="15.09";
        weight[19][1]="17.01";
        weight[19][2]="20.02";

        weight[20][0]="12.02";
        weight[20][1]="13.04";
        weight[20][2]="14.07";

in opposite world i love programming
__________________
in opposite world i love programming
 
Old January 3rd, 2008, 09:12 AM
Friend of Wrox
 
Join Date: Dec 2003
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

What do you mean by parsing a variable. What result are you expecting to get?

--
Charlie Harvey's website - linux, perl, java, anarchism and punk rock: http://charlieharvey.org.uk
 
Old January 22nd, 2008, 04:05 PM
Authorized User
 
Join Date: Nov 2003
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sonicDace Send a message via MSN to sonicDace Send a message via Yahoo to sonicDace
Default

Double.parseDouble( weight[20][2] )

thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
Convering a String Array to an Integer array nkrust C# 9 November 17th, 2010 12:02 PM
Go from 2d Array to 1d array without defining type OneQuestion General .NET 1 January 10th, 2008 11:13 AM
error when sorting an Array of Array nancy VBScript 2 February 17th, 2005 12:57 PM
Parsing a Listbox Array jkilgo PHP How-To 2 December 21st, 2004 02:30 PM
Passing php array values to javascript array gkrishna Pro PHP 0 November 6th, 2004 03:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.