Question when entering a function.

Asked 1 weeks ago, Updated 1 weeks ago, 1 views

When using a function,

For example, you have a variable (a=3252).

Some are a.function

Some are functions (a)

 " ".join(a)

 a.replace(":", "#") //a.reverse( ))

There's this. How do you use it separately? Do I have to memorize everything?

Please answer me. Thank you.

function

2022-09-20 11:18

1 Answers

There are two main types of general variables in languages that support object orientation. One is a variable that stores only values (such as the common int type), and the other is a class-made variable.

What you need to know here is that within a class of variables, they don't just store values, they contain functions. A variable usually contains a function called a member function (or method).

In the a. function , a is a class-generated variable, and a. to the right of a. indicates a member function in the variable a and means to execute the function.

On the other hand, the function (a) is executed by putting a as an argument in the general function.

Usually a. function like this, Ah, the variable a is a class-type variable.You can think of it as .


2022-09-20 11:18

If you have any answers or tips


© 2022 pinfo. All rights reserved.