Multi-understanding

xiaoxiao2021-03-06  76

I used to have a saying in a satirical joke: the more you know, the more you think that you are a bastard, the less you know, the more you think that you are a saint;

5.String foo = "base";

6.foo.substring (0, 3);

7.FOO.CONCAT ("KET");

8.

TYPE THE VALUE OF FOO AT LINE 8?

The answer is Base ..... why? Because foo.substring and foo.concat have done 2 methods, did not explain who did it; so the value of foo has not been changed, put the above code, Change it, this is easy to understand:

String foo = "basen";

String a = foo.substring (0, 3);

String b = foo.concat ("ket");

-------------------------------------------------- --------------------

Sure enough, after more than a month, I have learned a period of time (although I can't understand it at that time ...), I thought that Java's basic knowledge was a good time. Today, I found a lot of groups. But the most sad thing is that even if you look at the answer, you can't find the reason ... Sorrow ... It seems that the foundation is not solid enough!

Hey. . Work hard, continue!

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

New Post(0)