Sorry but I still do not understand what you mean by 'convert'. A file (as I said previously) is merely a stream of bytes, so reading it into memory you automatically have an array. What exactly are you trying to do with this file's content?
That is the third time you have posted exactly the same information which gives no explanation of what you mean by "convert". As I said before, if you read the file into memory it will be in an array of bytes, so what do you want to convert it to?
There is little point in you continuing to repeat the same sentence which makes no sense. I cannot repeat enough that a file (any file) is a 1-dimensional array of bytes, so what exactly are you trying to convert it into, and how do you expect to make it 2-dimensional?
Please try doing a bit of research before posting questions like this. If you have a specific problem then show what you have done and what errors you receive. But don't assume that we can guess what is happening in your program.
publicclass Calendar extends Applet
int b=0, c=0;
JLabel lblInput= new JLabel("Input year:");
JTextField txtInput= new JTextField("2012",4);
JLabel lbl1= new JLabel;
JButton btnOk=new JButton("OK");
//JButton btnClr=new JButton("Clear");
//public void init()
sir .. can you help me ..
There was no error . but when i try to run file .. it failed to initialize . I just want to have a calendar in Java for our finals .. I think its not really difficult .. so i choose this proposal. thanks .. I hop you help me guys
NOTE: Sorry guys it was my first time to do java .. so please don't laugh at me .. LOL
in the above code you stored array with five elements so yor index range from 0 to 4 you mention i=1 and maxmium is 5 so for iterations i become 5 at that time it will give arrayoutbound exception you can just change
sorry but you solution didnt work,
there is problem in in this statement a[i]>a[i+1] ,when i be 5 ,it is in a>a, so compiler search for a and dont found,so here gave me the problem ,and by the way what is a[i]>a[i+1] i didnt get it