File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Query" Watch "Query" New topic


Vallabhaneni Suresh Kumar
Ranch Hand

Joined: Mar 01, 2004
Posts: 68
There are 3 levels and under each level there will be 5 questions. Based on the level number which will be passed as a parameter we have to read the questions. There will be a file which comprises of all 15 questions of which first 5 belongs to level 1 and next 5 belongs to level 2 and the last 5 belongs to level 3. We have to read the questions for a specific level and they must be stored in an arraylist. Can anyone help me in solving this problem using Java? If possible write the code also.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Vallabhaneni,I'm afraid you posted the right question in the wrong forum...
There are Java in General forums to post such kind of questions... It will be more likely to be replied, if you post your questions in the proper forum... Just my 2 cents...

Co-author of SCMAD Exam Guide, Author of JMADPlus
anshul agrawal

Joined: Aug 16, 2002
Posts: 10
The directly reach that question of a particular level if level starts from 1 then 5*(level-1)+1; so if question are from 1 to 15 ;for level 1 question starts from 1 and for level 2 question start from 6 and level 3 starts from 11.
to add question to array list use for loop from 1 and ending at i<=5.
I think this would solve your problem

Anshul Agrawal<br />SCJP 1.4<br />SCWCD 1.4 Beta
I agree. Here's the link:
subject: Query
It's not a secret anymore!