Monday, July 29, 2013

Java Program For Student Records

import java.io.*;
public class Studentrecords
{
         public static void main(String ap[]) throws IOException
         {
                  Student S=new Student();
                  S.scan();
                  S.print();
         }
}

class Student
{
         InputStreamReader i=new InputStreamReader(System.in);
         BufferedReader br=new BufferedReader(i);
         int sno;
         String name;
         long fees;

         public void scan() throws IOException
         {
                  System.out.println("enter student's sno,name and fees");
                  sno=Integer.parseInt(br.readLine());
                  name=br.readLine();
                  fees=Long.valueOf(br.readLine()).longValue();
       
         }
         public void print()
         {
                  System.out.println(sno+name+fees);
         }
}       
Facebook Blogger Plugin: Bloggerized by Software Tips Enhanced by Akash Parnami

Leave a Reply