It means that the argument of the method is first considered when the compiler tries to understand which variable is named ”x”. Your class "display" has a field named ”x”, and the argument of the method ”cal” is also named ”x”. Either you change the name of one of the variables, or you use the keyword ”this”.
{ } is a field var declared inside field are local var field need not to belong to a specific method or class it can be used even without any name
Обсуждают сегодня