hi everyone..

I have this assignment that I should sort whatever I enter in ascending order of the variable a .. I want to know what is wrong with this

Thank you all in advance..

public void addRecord()
	{
		Scanner abc=new Scanner(System.in);
		System.out.println("Enter the file number ");
		int a=abc.nextInt();
		System.out.println("Enter the name ");
		Object b=abc.next();
		System.out.println("Enterur the jender ");
		Object c=abc.next();
		System.out.println("Enter the blood group ");
		Object d=abc.next();
		System.out.println("Enter the phone number");
		Object e=abc.next();
		if(head!=null)
		{
			
			NodeP m=new NodeP(a,b,c,d,e);
			tail.next=m;
			tail=m;
			NodeP t=head,p=head.next;
			if(t.v1>p.v1)
			{
				t=head.next;
				p=head;
			}
			while(t.next!=null)
			{
				if(t.v1>t.next.v1)
				{
					p=t;
					t=t.next;
				}
			}
		}
		else
			tail=head=new NodeP(a,b,c,d,e);

Anyone have an idea

U have to do it by your self my dear
and submit to me in ur class on Saterday

Regard
Ms.Kavita

commented: LOL! +0

U have to do it by your self my dear
and submit to me in ur class on Saterday

Regard
Ms.Kavita

If this post is for real then 2 thumbs up. LOL!

Hi miss ^_^

Don't warry I thinke we did it fine ..

Ha ha ha :D

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.