• Breaking News

    Constructor ব্যবহার করে জাভা প্রোগ্রাম

    Constructor ব্যবহার করে জাভা প্রোগ্রাম


    প্রোগ্রামের সোর্স কোড-



    public class Student

    {

    Int Roll;

    String Name;

    float Mark;

    public Student()  //Constructor Method

    {

    Roll=12132;

    Name=”Alex”

    Mark=96.25f;

    System.out.println(“Roll is:”+Roll);

    System.out.println(“Name is:”+Name);

    System.out.println(“Mark is:”+Mark);

    }

    }

    public class cons

    {

    public static void main(String args())

    {

    Student s=new Student();

    }

    }


    পরবর্তী প্রোগ্রাম- 

    No comments