Small java Knowledge in Development and small java Knowledge in Development
I encountered the instr and substr functions when optimizing a function today. I have never touched these two functions before, but I did not use them until I checked them. It was a practical one.
Let's talk about the substr function. This function returns a part of the string.
Substr (string, start, length)
The string parameter is a required parameter and the content of the string to be truncated.
Start is a required parameter. It can be a positive number or a negative number. If it is a positive number, it indicates that it starts from the specified position of the string. If it is a negative number, it indicates that it starts from the specified position at the end of the string; 0 indicates that it starts at the first character in the string.
Length is not a required parameter. It is the truncation length. A positive number indicates the number of characters returned from the start parameter. A negative number indicates the number of characters returned from the specified position at the end of the string.
For example:
Substr ("Hello World! ",) Returns e
Substr ("Hello World! ", 2) the returned result is ello World!
Substr ("Hello World! ",-2, 1) returns d
Substr ("Hello World! ",-2,-1) returns d!
Instr (string1, string2, start_position, nth_appearance)The function returns the position of the string to be truncated in the source string.
String1 source string to be searched in this string.
String2: the string to be searched in string1.
Start_position indicates the start position.
Nth_appearance indicates the number of string2. this parameter is optional. If omitted, the default value is 1. If it is negative, an error is returned.
For example:
Instr ("Hello World! "," O ") returns 5
Instr ("Hello World! "," O ", 1, 2) returns 8. This statement indicates the position where "o" starts from the first position of the string and the second "o" appears.
What are two useful functions?
Problems encountered during java Development
Maybe JDK is different. I also met; amount
How to deal with old projects during java Development
You said that you have no development experience, and the level is poor. So how did we get the three projects in our hands? Can you take over so many projects in one month? No one in the company, or why? If the old project cannot be understood, you can tell the leader that if the leader wants you to do it, ask the leader to pick up the other three projects in your hand. If the leader does not agree. So, it can only be explained: 1. Your company is too unreliable, and you do not need to carry it down; 2. The leaders deliberately make it difficult for you, and you have no need to wait. Generally, the company won't be so embarrassed for its employees. If you really want to hire you, you will also arrange your work based on your abilities. You just need to do your best. Do not be afraid or be willing to accept it.