Home Answers Viewqa Java-Beginners How to create a Student data base using Linked List in java

 
 


Sravan Kumar
How to create a Student data base using Linked List in java
2 Answer(s)      a year and 5 months ago
Posted in : Java Beginners

I want a program by using linked list in java. The data stored must be as Records name age dob Record1 bindu 20 20feb Record2 kavya 21 4mar Record2 sandhya 22 5apr

By using linked list I hve to do that is if user asks record2 that should be display and if user donâ??t want anything it should display null

View Answers

December 21, 2011 at 3:20 PM


import java.util.*;
class StudentData
{
    String record;
    String name;
    int age;
    String dob;

    StudentData(String record, String name, int age,String dob){
        this.record=record;
        this.name=name;
        this.age=age;
        this.dob=dob;
    }
    public String getRecord(){
        return record;
    }
    public String getName(){
        return name;
    }
    public int getAge(){
        return age;
    }
    public String getDob(){
        return dob;
    }
    public static void main(String[] args) 
    {
        LinkedList<StudentData> list=new LinkedList<StudentData>();
        list.add(new StudentData("Record1","bindu",20,"20feb"));
        list.add(new StudentData("Record2","kavya",21,"4mar"));
        list.add(new StudentData("Record3","sandhya",22,"5apr"));

        Scanner input=new Scanner(System.in);
        System.out.print("Enter record no to display: ");
        String rec=input.next();
        for(StudentData data:list){
            if(data.getRecord().equals(rec)){
            System.out.println(data.getRecord()+"\t"+data.getName()+"\t"+data.getAge()+"\t"+data.getDob());
            }
        }
    }
}

June 26, 2012 at 3:48 PM


if i want to delete data than????









Related Pages:
How to create a Student data base using Linked List in java
How to create a Student data base using Linked List in java  I want a program by using linked list in java. The data stored must... Record2 sandhya 22 5apr By using linked list I hve
linked list
program to manage the registration details for the institute. 1. Use a linked list to manage the details of all registered students. a. Create your own linked list...linked list  Data Structures An English institute has a different
Linked list implementation
Linked list implementation  How to create linkedlist by using array in java? and also How to manipulate
using list iterator create student details - JavaMail
using list iterator create student details  write a java program to create student class with particulars like name, rno, marks,etc. and print them... which will describe you how to create Student class and add its properties
creating java linked list - Java Beginners
creating java linked list  how can one create a sorted linked list...("Size of list: " + queue.size()); System.out.println("Queue head using peek : " + queue.peek()); System.out.println("Queue head using element
HELP Generic linked list
HELP Generic linked list  How to create Generic linked list example program in Java
linked list
linked list   how to add student and mark and number from file in linked list and print them also how to make search function plz can help me sooon
linked list
linked list  Hi i have a problem with linked list ! how and where i can use linked list? please give me some example.   Please visit...://www.roseindia.net/java/beginners/linked-list-demo.shtml
data base
data base  how to connect coding in data base ?   The given...(); /* Create a connection by using getConnection() method that takes parameters...>Connection status </h1> <% try { /* Create string of connection url
stack using linked list
stack using linked list  how to implement stack using linked list
Linked List
in the following logical linked list represents Computer Number. 76(head) 98 54...? to ?66?. The segment should also display the new contents of the linked list. ii. Write a program segment to copy all ?Dell? computers to a new linked list
linked list
linked list   how to write a program using a linked list...); System.out.println("Add elements to LinkedList: "); LinkedList<String> list=new...); } Collections.reverse(list); System.out.println("List of names in reverse order
linked list in java - Java Beginners
linked list in java  Hi, how to implement linked list in java using... information. http://www.roseindia.net/java/beginners/linked-list-demo.shtml...(); for (int i = 0; i < N; i++) { // look up a value in the list // using
Queue implementation using linked list.
Description: The advantage of using linked list is that there is no size... { int data; struct node *link; }; void insert(struct node **front, struct...;); exit(0); } temp->data = value; temp->link=NULL; if(*rear
Simple Linked List Exercise 1
Java Notes: Simple Linked List Exercise 1 Name... and puts them in a doubly linked list. 1 2 3 4 5 6 7 8... __________(); // Create a new list element. e.__________ = word
Simple Linked Lists
(); // Create a new list element. e.data = word; // Set the data... to the data. } A simple doubly-linked list This makes only minor changes so... Java Notes: Simple Linked Lists This shows three programs. A simple
Singly Linked List
Description: In this example you will see how to create a node and insert data record in singly link list.  Code: # include <stdio.h>... ) { printf("The data values of your list are\n"); while (p!= NULL
linked list example problem - Java Beginners
linked list example problem  Q: Create your own linked list (do... by repeatedly using your add function to populate a new instance of your linked list..., elem1, elem2, â?¦, elemN] Test your linked list in a main method which
linked list example problem - Java Beginners
linked list example problem  Q: Create your own linked list (do... by repeatedly using your add function to populate a new instance of your linked list..., elem1, elem2, â?¦, elemN] Test your linked list in a main method which
Linked list
Linked list  what is difference btw linked list in datastructure and linked list in java
JSP data base validation
JSP data base validation  please explain how to validate form input string with database n also how its notify that entered data exists already .please reply soon   hi friend, <%@ page language="java" contentType
about linked list
about linked list   hey can u help me soon ?? i want to add student... in linked list   import java.util.*; class StudentData{ int id...(); list.add(new StudentData(id,name,m)); } for(StudentData data:list
DATA BASE
DATA BASE  Create a program to establish a connection to the PCTBC database using the JDBC driver to retrieve the entire Lectures table and displays the data using a J Table.   Here is a code that connects to MySql
Circular Linked List
Description: In the circular linked list the link of lat node is connected... = p; printf("The data in the list are :\n"); if (p!= NULL...; struct node { int data; struct node *link; }; struct node *insert(struct
How to create a data base connectivity using sqlserver or Mydql through J2ME - JDBC
How to create a data base connectivity using sqlserver or Mydql through J2ME   hi , iam new to J2ME,i want to know, How to create a data base connectivity using sqlserver through J2ME. Currently we are working
Multiplication of two polynomials using linked list in java
Multiplication of two polynomials using linked list in java  I am doing a program "Multiplication of two polynomials using linked list in java... for polynomial linked list import java.util.Scanner; class Node { public int
student
student  how do i create a program that writes out the message :Welcome to Kaplan University!"   Hi Friend, Try the following code: class Message { public static void main(String[] args
Doubly Linked List
{ int data; struct dnode *prev, *next; }; struct dnode *insert(struct dnode...;Error Occurred\n"); exit(0); } p->data = n; p-> prev...\n"); exit(0); } temp->data = n; temp->prev = (*q
student
student  There is only 1 player. Use JAVA Random toolkit to generate... how many times has the user guessed a number. The program should display user... link: Java Guess Number
write a java pogram to add elements to linked list using keyboard and display it
write a java pogram to add elements to linked list using keyboard and display it  write a java pogram to add elements to linked list using keyboard and display
Data base Connectivity
Data base Connectivity  How to configure JDBC connection for Oracle data base.In configuring it is asking select Data server name and TNS.I typed Oracle for Data Server Name and IN TNS what to type? I pulled the list for TNS
How to read bytes from a Linked list - Java Beginners
How to read bytes from a Linked list  i have stored byte array into a linked list. How to read the bytearray dta byte after byte from a linked list.Thanking u in advance Sameer
Create a deque linked list of Entry Objects - Java Beginners
Create a deque linked list of Entry Objects  I need to know if I have successfully created a Square Matrix List of Entry Objects. The detail desciption and my java code solution follows: A) Description 1) The List ADT
Data base related question
Data base related question  sir my table has only one element(that is pno),i am using ms-access as backend. i put only one element i want to retrieve that element .how can i retrieve that element,using jdbc technology. please
Linked List Example
LinkedListExample Linked List Example! Linked list data: 11 22 33 44 Linked... Linked List Example     ... of List interface. We are using two classes ArrayList and LinkedList
linked lists
linked lists  write a program to create a circular linked list in java and perform operations on it?   import java.util.*; public class...) { CircularLinkedList<String> list = new CircularLinkedList<String>
Explain Linked List
Explain Linked List   hello, What is Linked List ?   hello, Linked List is one of the fundamental data structures. It consists of a sequence of nodes, each containing arbitrary data fields pointing to the next
Data base - JDBC
"); con.close(); }//main }//class For this should i create a user defined data type...Data base  I want to do this Inserting a record with Object type column using PreparedStatement but wht should b the column datatype this is te
Student Admission Form in Java - Java Beginners
and jcalender 1.3.3 version and odbc data sources . 1 .first create a table... for datasource field and from Data base section (below) click on select button...Student Admission Form in Java  I want to store following Information
Core java linked list example
Core java linked list example  What is the real time example for linked list
Lang and Util Base Libraries
independent. Logging Using this API you can create log reports which can help...Lang and Util Base Libraries The Base libraries provides us the fundamental features and functionality of the Java platform. Lang and Util Packages Lang
insert excel value in to oracle data base
the data from the excel file using JDBC. For this you need to create dsn...insert excel value in to oracle data base  Hi All I am using... this Excel file then how excel data will mapp to oracle database table. My project
How to solve this java code by adding the student marks not in the list of the table. For example -10 and 156 in GUI?
How to solve this java code by adding the student marks not in the list...; marks >= 100) { data[a].setGrade("Not in the list of the table...()); MarkStudent data[] = new MarkStudent[num]; for(int a = 0; a < data.length
How can we save a data list in jsf?
How can we save a data list in jsf?  I have a code in jsf that fires a query in Data Base each time it is called, i have added a validation check to fire query only if list is not-empty but the list gets empty each time
please send me the banking data base in swings
please send me the banking data base in swings  sir, please send me how to create the banking data base program in swings
linked list
linked list  program for single linked list
Retrieving data from data base using jsp combo box
Retrieving data from data base using jsp combo box  Hi guys please help me , i have on GUI page int that Server type(like apache,jboss,weblogic) one... field.please help me i'm new to this java please help me
data base question - Java Interview Questions
data base question  first we create a table with out create primary kay,after that i want to create same record with primary key,but no duplicate record,no deletion and after creation.  Hi, Query to create
Java GUI to build a Student Registration Program
by creating a driver program to load the student data base and the course data...Java GUI to build a Student Registration Program   Write a program... should graphically display a sorted list of registered courses for a student
Student - Java Beginners
Student  Create a class named Student which has data fields... void main(String[]args){ Scanner input=new Scanner(System.in); Student data[]=new Student[2]; for (int i=0; i65&&tm<75){ data[i].setGrade("C

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.