What is not the use of “this” keyword in Java

date:2024-06-05 12:25:48 author:admin browse: View comments Add Collection

What is not the use of “this” keyword in Java

 What is not the use of “this” keyword in Java?

a) Passing itself to another method

b) Calling another constructor in constructor chaining

c) Referring to the instance variable when local variable has the same name

d) Passing itself to method of the same class

Answer: d

Explanation: “this” is an important keyword in java. It helps to distinguish between local variable and variables passed in the method as parameters.

支付宝转账赞助

支付宝扫一扫赞助

微信转账赞助

微信扫一扫赞助