aspose file tools*
The moose likes Beginning Java and the fly likes  Manfred please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark " Manfred please help" Watch " Manfred please help" New topic
Author

Manfred please help

peter brews
Ranch Hand

Joined: Jan 25, 2002
Posts: 59
Thanks for previous reply.I would appreciate if you help in making changes to the program below in order to get the following result:
field1[0]| val1|
field2[0]|val2|
|val3|
[5]|val4|
|val5|
|val6|
field3[2]|val1|
|val3|
|val4|
[5]|val5|

The required output is one object or vector or any other suitable data str per field
In a following way:
field1 index zero(the value in square bracket) should have value “val1”
field2 index zero(the value in sqaure bracket) should have value “va2”
field2 index one(the square bracket is absent, so value in above square bracket should be incremented by one) should have value “val3”
field2 index two should have value “null”
field2 index three should have value “null”
field2 index four should have value “null”
filed2 index 5 should have value “val4”
filed2 index 6 should have value “val5”
filed2 index 7 should have value “val6”
filed3 index zero should have value “null”
Filed3 index 1 should have value “null”
Filed3 index 2 should have value “val1”
Filed3 index 3 should have value “val3”
Filed3 index 4 should have value “null”
Field3 index 5 should have value “val5”
The program is :
package mypackage;

Thanks,
smita
edited by Dave to use code tags
[ February 12, 2002: Message edited by: Dave Vick ]
peter brews
Ranch Hand

Joined: Jan 25, 2002
Posts: 59
please advise in making changes to the program below in order to get the following result:
field1[0]| val1|
field2[0]|val2|
|val3|
[5]|val4|
|val5|
|val6|
field3[2]|val1|
|val3|
|val4|
[7]|val5|
The required output is one object (or vector or any other suitable data str)per field
In a following way:
In vector:
Vector - field1( val1)
Vector field2(val2,val3,null,null,null,val4,val5,val6)
Vector field3(null,null,val1,val3,val4,null,null,val5)
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Smita,
Assuming you have given me the input.txt file. The following code should work.

Regards,
Manfred.
 
 
subject: Manfred please help