
class A { int a=3; int b=4; public A(int a,int b) { this.a=a; this.b=b; } void display() { System.out.println(a); System.out.println(b); } } class Testthis { public static void main(String arr[]) { A x=new A(8,9); x.display(); } }
/* in the above code which manner will adopted by the jre to complile display method becouse in display() not a any parameter is passed between the parrentheses .............example is--------suppose display is looking like as ....................void display(int x); */

In the given code, you have used 'this' keyword. It invokes the constructor of same class ad take the values that are given in the main method.So when you call the display method, it take the values from the constructor and display the values of a and b.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.