current location:Home > Technical Articles > Java > JavaBase

  • The reason why the specified path cannot be found when creating a file in java
    The reason why the specified path cannot be found when creating a file in java
    When creating a file, it prompts that the specified path cannot be found. This is because the directory has not been created. When you create a file, you should first create the file's parent directory and then create the file.
    JavaBase 6642 2019-11-27 09:23:58
  • Java question mark garbled solution
    Java question mark garbled solution
    Solution to Java garbled question marks: 1. Convert Chinese encoding format during output (String(str.getBytes("GB2312"), "8859_1");). 2. Convert the encoding format when reading from parameters, the method is opposite to that when outputting.
    JavaBase 3831 2019-11-27 09:15:35
  • How to determine whether a string is a decimal in java
    How to determine whether a string is a decimal in java
    The method to determine whether a string is a decimal in "java" is: first, by calling the "isBlank()" method to initially determine whether the string is empty or composed of blank characters, then define a regular expression for judgment, and finally by calling The "matches" method can determine whether a string is a decimal.
    JavaBase 4597 2019-11-26 17:42:58
  • How to determine what a string starts with in java
    How to determine what a string starts with in java
    The way to determine what a string starts with in "java" is: first define a variable to save the prefix string, and then call the "startsWith" method to determine. If the string starts with the specified prefix, "true" will be returned. Otherwise, "false" is returned.
    JavaBase 11795 2019-11-26 17:14:20
  • How to determine how many specified characters a string contains in java
    How to determine how many specified characters a string contains in java
    The way to determine how many specified characters a string contains in "java" is: first define a variable to save the number of occurrences of the specified character, then call the "indexOf" method to calculate the subscript of the specified character, and finally use "if" Just use the sentence to make a judgment.
    JavaBase 12402 2019-11-26 16:56:10
  • Characters in java are garbled
    Characters in java are garbled
    The reason why the characters in "java" are garbled is: the characters are garbled due to inconsistency between the encoding method and the decoding method. The solution is: first use the function "defaultCharset" to view the default character set used by the system, and then modify the decoding method to be the same as the encoding method.
    JavaBase 2293 2019-11-26 16:45:09
  • Introduction to java learning process
    Introduction to java learning process
    Java is a very popular language. Many people are learning Java now. We can easily find many Java tutorials on the Internet, but most of the tutorials we find on the Internet are scattered, which is not conducive to our Java learning. This article will introduce you to the learning process of java.
    JavaBase 3605 2019-11-26 16:35:28
  • How to determine whether a string contains a certain character in java
    How to determine whether a string contains a certain character in java
    The method to determine whether a string contains a certain character in "java" is: first, you can use the "contains" method, which returns "true" only if and only if the string contains the specified sequence of character values. Secondly, you can also use "indexOf" method, but the return value of this method is "int".
    JavaBase 9575 2019-11-26 16:32:14
  • Java collection class graphic tutorial
    Java collection class graphic tutorial
    Java collection classes are the basic knowledge in Java. Collections are mainly responsible for saving and holding other data. Therefore, collection classes are also called container classes. All collection classes are located under the java.util package. This article introduces us to the collection class in Java in detail, hoping to provide some help when you learn Java.
    JavaBase 1953 2019-11-26 16:16:18
  • Detailed explanation of transient keyword in java
    Detailed explanation of transient keyword in java
    Java provides a mechanism for object serialization. An object can be represented by a byte sequence that contains information such as the object's data, the object's type, and the attributes stored in the object. After the byte sequence is written to the file, it is equivalent to persisting the information of an object in the file. Conversely, the byte sequence can also be read back from the file.
    JavaBase 1745 2019-11-26 16:14:58
  • How to implement java string formatting and add 0 if the length is insufficient
    How to implement java string formatting and add 0 if the length is insufficient
    The method to realize the filling of 0 when the length of string formatting in "java" is insufficient is: first, you can save the length of the string that needs to be formatted into a variable, and then compare it with the required length. If the length is insufficient, further use a "while" loop Judgment, use the "append" function to add 0 to the insufficient part.
    JavaBase 5468 2019-11-26 16:12:06
  • How to avoid garbled characters in java programs
    How to avoid garbled characters in java programs
    The reason why garbled characters appear in the "java" program is that the original encoding format of the string is inconsistent with the encoding format used for parsing when reading. The way to avoid garbled characters is: first, you must know that "java" is uniformly represented by "Unicode" in the string, and then ensure that the string encoding is consistent with the encoding format used for parsing when reading.
    JavaBase 2900 2019-11-26 15:55:25
  • The difference and implementation of 'shallow copy' and 'deep copy' in Java (with code)
    The difference and implementation of 'shallow copy' and 'deep copy' in Java (with code)
    Shallow copy, also known as shallow copy. Create a new object, and then copy the non-static fields of the current object to the new object. If the field is of value type, then copy the field; if the field is of reference type, copy the reference but not the referenced object. Deep copy not only copies the object itself, but also copies all objects pointed to by the references contained in the object.
    JavaBase 1979 2019-11-26 15:53:10
  • Java operation database - use connection pool to connect to the database
    Java operation database - use connection pool to connect to the database
    Create a connection pool and configure connection properties. Use a connection pool to obtain a connection. Every time you need to connect to the database, you do not need to establish a connection, but obtain it through the connection pool, which provides the connection. After using the connection, you do not need to manually release the connection, but let the connection pool release the connection.
    JavaBase 3701 2019-11-26 15:43:13
  • How to implement bubble sorting of arrays in java
    How to implement bubble sorting of arrays in java
    Below, the Java introductory learning column will introduce how to implement bubble sorting of arrays. I hope it can help you. Compare two adjacent elements in turn. If the former is greater than the latter, swap positions. After each sorting pass, the maximum value in this pass will be placed in the last position. Repeat the above process until there are no elements that need to be compared.
    JavaBase 1864 2019-11-26 15:22:18

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!