Syntax
import java.*;
import java.io.*;

public  class this_keywords
{
 int id;
  String name;
  
   this_keywords(int id, String name)
    {
  this.id = id;
  this.name = name;
  }
  void display()
  {
  System.out.println("ID = "+id+" Name = "+name);
   }
   public static void main(String arg[])
    {
    this_keywords t = new this_keywords(101,"pratik");
    this_keywords t1 = new this_keywords(102,"badala");
      t.display();
   t1.display();
     }
 }

OUTPUT
ID = 101 Name = pratik
ID = 102 Name = badala
See How to Implement This Program :
please Subscribed this tutorial to : Click here

Leave a Reply

Subscribe to Posts | Subscribe to Comments

All Notes on BCA

All Notes  on BCA
BCA all subjects notes

Total Pageviews

Translate

Powered by Blogger.

Copyright © All Notes on BCA