Professional Documents
Culture Documents
CLASS: BSSE-2-B
QNO.1
PROGRAM:
package javaapplication1;
import java.util.Scanner;
System.out.println("enter a number");
if(num%2==0){
else{
OUTPUT:
QNO.2;
PROGRAM:
package javaapplication1;
class Student {
this.studentname = s;
this.studentid = x;
this.studentname = s;
this.studentid = x;
return this.studentname;
System.out.println("Id: "+this.studentid);
System.out.println("Name: "+this.studentname);
System.out.println("Id: "+this.studentid);
student[0].setStudentName("raja");
student[0].setStudentid(555);
for(int i=0;i<3;i++){
student[i].getStudentname();
student[i].getstudentid();
for(int i=0;i<3;i++){
student[i].display();
OUTPUT: