Java FRM Tutorial
Java FRM Tutorial
com
import java.io.*;
class addition
int num1,num2,sum;
try
num1=Integer.parseInt(x.readLine());
num2=Integer.parseInt(x.readLine());
sum=num1+num2;
System.out.println(“Sum is “+sum);
catch(Exception e)
Page | 1
[email protected]
Page | 2
[email protected]
Page | 3
[email protected]
Page | 4
[email protected]
Page | 5
[email protected]
Page | 6
[email protected]
Page | 7
[email protected]
Page | 8
[email protected]
Page | 9
[email protected]
Page | 10
[email protected]
Page | 11
[email protected]
Page | 12
[email protected]
Page | 13
[email protected]
import java.io.*;
class student
int rno;
String name,branch;
void get()
try
System.out.println("Enter rollnumber");
rno=Integer.parseInt(x.readLine());
System.out.println("Enter Name");
name=x.readLine();
System.out.println("Enter Branch");
branch=x.readLine();
catch(Exception e)
void display()
{
Page | 14
[email protected]
System.out.println("");
System.out.println("Student Details");
System.out.println("Name: "+name);
System.out.println("Branch: "+branch);
class exam
int regno,mark;
void read()
try
regno=Integer.parseInt(x.readLine());
System.out.println("Enter mark");
mark=Integer.parseInt(x.readLine());
catch(Exception e)
}
Page | 15
[email protected]
void write()
System.out.println("");
System.out.println("Exam Details");
System.out.println("Mark: "+mark);
class main1
s.get();
e.read();
s.display();
e.write();
Page | 16
[email protected]
Page | 17
[email protected]
Page | 18
[email protected]
Page | 19
[email protected]
Page | 20
[email protected]
Page | 21
[email protected]
Page | 22
[email protected]
Page | 23
[email protected]
Page | 24
[email protected]
Page | 25
[email protected]
Page | 26
[email protected]
Page | 27
[email protected]
Page | 28