Interviews3 answers
What will be the output of below code snippet? Class A{ Int a=10; Int b=20; A(int a, int b) { a=a; b=b; Console.write(a, b); Console. Write(this.a, this.b) } Method Call A(5,10)
3 Answers
5, 10 10, 20
Nani Veerabhadra KarriPosted Oct 19, 2017, 6:38 AM EDT
Class name and function name cannot be identical, hence, will result in compilation error. Either change the class name or function name
Sreenivasan PalaniappanPosted Sep 6, 2017, 11:06 PM EDT
5, 10
10, 20
Rahul ChavanPosted Apr 4, 2016, 9:18 PM EDT

