K ILL NOT REPEAT THIS AGAIN....Send me d coding...

K ILL NOT REPEAT THIS AGAIN....Send me d coding...

Repeat what? Where are you having problems with and what is your question?

Just because you send me 3 PMs it doesn't mean that everybody can read my messages and nobody knows your question. And hijacking an old 1-year old thread will not get you any answers. It doesn't mean that we are suppose to remember the question you made in one old thread that nobody reads and give the answer to a new one.

You have a question; then asked it. Because what you wrote doesn't mean anything and almost everybody here don't know your original question.

We are waiting for the appropriate question because it is not our job to give you the answer, we are volunteering to help you. It is you who have the question and needs to be polite.

i need to get the marks of five students,and i should grade them according to their marks lyk,1st rank,2nd rank.....here i should use arraylist....

i need to get the marks of five students,and i should grade them according to their marks lyk,1st rank,2nd rank.....here i should use arraylist....

Search this forum for examples on how to use the java.util.Scanner class. You will use it to read data from the keyboard.
Scanner

Then put those values into an ArrayList. Use a for loop.

for - loop { // 5 times or as many times as you like
  // read input
  list.add(input)
}

Then write a method that sorts the ArrayList. Or better yet, use the algorithm that searches for the max number of the ArrayList, print it and remove it. Then repeat until the ArrayList is empty:

while (list.size()>0) {
  // find the max
  // print it
  //  remove it
}

Check the API for the java.util.ArrayList class:
ArrayList

Then post the code you have so far, so we can give suggestions on how to proceed.
After you post what you have done, ask specific questions about which part of the code you are having problems with and what errors do you get at which line or what you don't understand

Search this forum for examples on how to use the java.util.Scanner class. You will use it to read data from the keyboard.
Scanner

Then put those values into an ArrayList. Use a for loop.

for - loop { // 5 times or as many times as you like
  // read input
  list.add(input)
}

Then write a method that sorts the ArrayList. Or better yet, use the algorithm that searches for the max number of the ArrayList, print it and remove it. Then repeat until the ArrayList is empty:

while (list.size()>0) {
  // find the max
  // print it
  //  remove it
}

Check the API for the java.util.ArrayList class:
ArrayList

Then post the code you have so far, so we can give suggestions on how to proceed.
After you post what you have done, ask specific questions about which part of the code you are having problems with and what errors do you get at which line or what you don't understand

import java.util.ArrayList;


/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/


/**
*
* @author trainee
*/
public class StudentRankList {

public StudentRankList()
{

}
public static void main(String args[])
{

ArrayList sNL = new ArrayList();
ArrayList e = new ArrayList();
ArrayList t = new ArrayList();
ArrayList m = new ArrayList();
ArrayList sc = new ArrayList();
ArrayList so = new ArrayList();

sNL.add("Student Name is : A,B,C,D,E");
e.add("Students Eng Mark is : 89,44,88,90,89" );
t.add("Students Tam Mark is : 78,75,57,89,78");
m.add("Students Mat Mark is : 67,78,89,90,77");
sc.add("Students Sci Mark is : 78,89,90,67,88");
so.add("Students Soc Mark is : 88,99,77,66,99");

for (Object value : sNL)
{
System.out.println(value);
}


for (Object value : e)
{
System.out.println(value);
}

for (Object value : t)
{
System.out.println(value);
}


for (Object value : m)
{
System.out.println(value);
}

for (Object value : sc)
{
System.out.println(value);
}

for (Object value : so)
{
System.out.println(value);
}


}

}

is tis way of declaration is correct?

I know which "student" would get the lowest marks were I the teacher here...

In one arraylist you will put the 5 marks. And it would be better if they were ints

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.