Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Wednesday, August 29, 2012

CJ-21 : Program to enter Student Details

Type the programs in NOTEPAD or DOS prompt itself, for Consol Application.
Type in NETBEANS or ECLIPSE for Window Application.
Here after , I am just typing the programs only..to know more about it , refer

Introduction to JAVA 

before doing any JAVA Programs.
***********************************************************************************************
Refer Enter student details using 2 functions also.
***********************************************************************************************
import java.io.*;
public class student 
{
    public static void main(String args[])
    {
        int rno;
        String name,branch;
        try
        {
            DataInputStream x=new DataInputStream(System.in);
            System.out.println("Enter Roll Number :");
            rno=Integer.parseInt(x.readLine());
            System.out.println("Enter Student Name :");
            name=x.readLine();
            System.out.println("Enter Branch :");
            branch=x.readLine();
            System.out.println("==========================");
            System.out.println("Roll Number ="+rno);
            System.out.println("Name ="+name);
            System.out.println("Branch ="+branch);
        }
        catch(Exception e)
        {
        }
        }
 }
=========================================================================
Output : 


Enter Roll Number :
1
Enter Student Name :
Priyada
Enter Branch :
Computer Science
==========================
Roll Number =1
Name =Priyada
Branch =Computer Science


No comments: