views:

175

answers:

2

Possible Duplicate:
LOOP in JAVA ???

Hi everyone I have this file :

CREATE MRED:NAME=MRED:0,MICR=0-0,CRC=TRUE,CODE=HDB3,NUA=FALSE,BER=E10_3,BAF=0,LREDUNEQ=SIMPLEXB,L1CTS=<NULL>,LOWBER=E10_6,REMAL=<NULL>,WMOD=SINGLE_TRUNK;
CREATE MRED:NAME=MRED:1,MICR=0-1,CRC=TRUE,CODE=HDB3,NUA=FALSE,BER=E10_3,BAF=0,LREDUNEQ=SIMPLEXA,L1CTS=<NULL>,LOWBER=E10_6,REMAL=<NULL>,WMOD=SINGLE_TRUNK;
CREATE MRED:NAME=MRED:2,MICR=0-1,CRC=TRUE,CODE=HDB3,NUA=FALSE,BER=E10_3,BAF=0,LREDUNEQ=SIMPLEXB,L1CTS=<NULL>,LOWBER=E10_6,REMAL=<NULL>,WMOD=SINGLE_TRUNK;
CREATE MRED:NAME=MRED:3,MICR=0-2,CRC=TRUE,CODE=HDB3,NUA=FALSE,BER=E10_3,BAF=0,LREDUNEQ=SIMPLEXA,L1CTS=<NULL>,LOWBER=E10_6,REMAL=<NULL>,WMOD=SINGLE_TRUNK;
.
.
.
CREATE MRED:NAME=MRED:60,MICR=5-2,CRC=TRUE,CODE=HDB3,NUA=FALSE,BER=E10_3,BAF=0,LREDUNEQ=SIMPLEXB,L1CTS=<NULL>,LOWBER=E10_6,REMAL=<NULL>,WMOD=SINGLE_TRUNK;

this is a part of the file with 14000 lines. MRED is diffrent ;for example in this case it's 60 but in another file is 25 and so on ...

I want this output :

MRED:0  (STLP-circ) ---> 0-0  SIMPLEXB   
MRED:1  (STLP-circ) ---> 0-1  SIMPLEXA
MRED:2  (STLP-circ) ---> 0-1  SIMPLEXB
MRED:3  (STLP-circ) ---> 0-2  SIMPLEXA
.
.
.
MRED:60  (STLP-circ) ---> 5-2  SIMPLEXB

In java with simple loop such as for or while

please help me...

Thanks a lot ...

+2  A: 
BalusC
+4  A: 

You should probably start with Sun's tutorials:

For control flow: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/flow.html

For IO: http://java.sun.com/docs/books/tutorial/essential/io/index.html

If you get stuck at a particular point, come back with a specific question.

FarmBoy