I am very happy today, I solved the fascination about this in Java.

xiaoxiao2021-03-06  14

Point (int x, int y) {this.x = x; this.y = y;} In the past few days in Java, I have been confused about such a code, I don't know why I want to use this.x = x; Although I haven't thought about it, I have not thinking about writing a small question. Although the book is written, but I don't understand, I have never written down the code today that there is a netizen given me an example, which is an example of JavaScript verification form, because before I have been programming with ASP, so I understand what I mean, the code is as follows: (2005-02-24 17:17:26) Dream I am now a simple example, such as the JavaScript form verification code Function Checkpwd (CurrentPwd) {Var len = currentpwd.lendpwd.length; // obtain a password length. IF (len <5) {// If LEN is less than 5, Window.alert ("You entered less than 5 digits, please re-enter!"); document.memberform.pwd.value = ""; returnaf false;} Else if (len> 8) {Window.alert ("You entered the password, please re-enter!"); document.memberform.pwd.value = ""; return false;} else {return true;} } When I saw this code, I understood the meaning of this in Java, I blamed my eyes too dead. I didn't understand the simple understanding of the simple understanding. The parameter is the parameter. The variable is a variable, and it is not possible. I always have the parameters in parentheses, if you put the parameter value, you will understand Point (1, 3) {this.x = x; this.y = y;} This is easy for me. More understanding, this.x = x; actually introduces the value of parameter X into the variable can be understood in the heart to understand x = 1; y = 3; this is only expressed in the process of learning and solving problems Experience a lot of fun, thank you very much for helping my friends ~~ Thank you again, you have your help in the process of learning, making me know more, learning faster

转载请注明原文地址:https://www.9cbs.com/read-48897.html

New Post(0)