Professional Documents
Culture Documents
1rvu22cse067 - Inchara T
1rvu22cse067 - Inchara T
1.
interface percentage
{
void percent();
}
class student
{
String name = "Rakesh";
int rollno = 87;
String dept = "BTech CSE";
int totalmarks = 90;
}
1.Output
2.
interface playable
{
void play();
}
2.Output
3.
interface department
{
String dptName = "Civil Engineering";
String dptHead = "Mr. Jagadish";
void display();
}
class hostel
{
String hotelname = "Krishna";
String hostelLocation = "RV College of Engineering";
int nofrooms = 60;
void show()
{
System.out.println("The name of hostel is: "+hotelname);
System.out.println("The location of hostel is:
"+hostelLocation);
System.out.println("No. of rooms in hostel: "+nofrooms);
}
}
3.Output
4.
interface student
{
String name = "Akshay";
int rollno = 012;
}
4.Output