this keyword

Write a program in java to demonstrate 3rd use of “this” keyword?

class This3 {                 int a,b;                 public This3(int x,int y)                 {                                 a=x;                                 b=y;                                 //”return this;”…

Read More

Write a program in java to demonstrate 2nd use of “this” keyword?

class This2 {                 int a,b;                 public This2()                 {                                 this(5,7);                                 System.out.println(“Default”);                 }                 public This2(int…

Read More

Write a program in java to demonstrate 1st use of “this” keyword?

class This {                 int a,b;                 public This(int a,int b)                 {                                 this.a=a;                                 this.b=b;                 }                …

Read More