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
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.
***********************************************************************************************
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 :
Output :