current location:Home > Technical Articles > Java > JavaBase

  • Solution to java get garbled problem
    Solution to java get garbled problem
    Java's get garbled solution: obtain the string in the background and convert the encoding, such as the common encoding ISO-8859-1 (String(name.getBytes("ISO-8859-1", "utf-8"))) This can solve the garbled get request.
    JavaBase 2811 2019-12-05 10:31:43
  • How to determine whether the code is garbled in java
    How to determine whether the code is garbled in java
    Garbled characters will appear when submitting data in java. We can use the "java.nio.charset.Charset.forName("GBK").newEncoder().canEncode("test")" method to determine whether it is GBK encoding. Garbled characters.
    JavaBase 3202 2019-12-05 10:17:48
  • Introduction to solutions to garbled files when reading files in Java
    Introduction to solutions to garbled files when reading files in Java
    Garbled characters when reading files in Java are caused by the inconsistency between the encoding used by Java and the encoding of the file being read. We can use FileReader's parent class InputStreamReader to read files and specify the encoding to solve the problem of garbled characters.
    JavaBase 3044 2019-12-05 10:07:41
  • Reasons and solutions why the file cannot be found in java relative file path
    Reasons and solutions why the file cannot be found in java relative file path
    The reason why the file cannot be found in the relative file path of java: because the user working directory in the environment variables used in different running modes is different. Solution: Just modify the system environment variables (System.setProperty("user.dir", "C:\\XXX\\XXX");).
    JavaBase 3392 2019-12-05 09:52:21
  • Solution to Java file compression garbled code
    Solution to Java file compression garbled code
    Solution to garbled java file compression: For compressed files, when the file name is Chinese, if you use the class compression that comes with the JDK API, the file name will be garbled. In this case, just use the class in ant.jar in ANT. This problem can be solved.
    JavaBase 2974 2019-12-05 09:45:37
  • Introduction to the method of determining whether a prime number is in Java
    Introduction to the method of determining whether a prime number is in Java
    How to determine whether it is a prime number in Java: first use the "src%2==0" statement to determine whether the number is an even number. If it is not an even number, pass it through the for (int i=3;i<=sqrt;i+=2) loop "src%i==0" determines whether it is a prime number.
    JavaBase 5097 2019-12-05 09:38:17
  • Solution to error code 1603 when updating java
    Solution to error code 1603 when updating java
    Solution to error code 1603 when updating Java: 1. After the 1603 error occurs, restart the system and uninstall the old version, then download and install the offline installation package. 2. Disable Java content through Java Control Panel, then install a new version and re-enable Java content.
    JavaBase 22867 2019-12-05 09:25:34
  • When to use static in java
    When to use static in java
    In "java", when a method or variable needs to be initialized and loaded, or is often called, you can add "static". Methods modified with "static" can be called directly with the class name, and those without "static" modification Methods must first instantiate an object before they can be called.
    JavaBase 4159 2019-12-04 17:59:09
  • How is polymorphism implemented in java
    How is polymorphism implemented in java
    Polymorphism in "java" is achieved through dynamic binding, that is, the actual type of the referenced object is determined during execution, and then its corresponding method is called according to its actual type. The existence of polymorphism requires three necessary conditions, namely: first, there must be inheritance; second, there must be overriding; third, the parent class reference points to the subclass object.
    JavaBase 5825 2019-12-04 17:20:04
  • How to define an interface in java
    How to define an interface in java
    The basic format of defining an interface in "java" is: "modifier + interface + interface name [extends + parent interface name list] {modifier + global constant; modifier + abstract method;}". It should be noted that defining an interface requires the use of "interface "keyword, only constants and abstract methods can be defined in the interface.
    JavaBase 7917 2019-12-04 16:56:52
  • How many bytes does the int type occupy in java?
    How many bytes does the int type occupy in java?
    The int type in java occupies 4 bytes. Byte is a unit of measurement used by computer information technology to measure storage capacity. It is a string of binary digits processed as a unit and is a small unit that constitutes information. The most commonly used byte is an octet, that is, it contains an eight-bit binary number.
    JavaBase 16356 2019-12-04 16:43:17
  • Several ways to implement multithreading in java
    Several ways to implement multithreading in java
    The way to implement multi-threading in "java" is: 1. Inherit the "Thread" class, create a class to inherit the "Thread" class, then rewrite the "run" method, and call the instance object of this class in the "main" method The "start" method is enough; 2. Implement the "Runnable" interface.
    JavaBase 4813 2019-12-04 16:43:08
  • What does instance mean in java?
    What does instance mean in java?
    An instance refers to an object implementation based on a certain class. This process is called instantiation. Instance generation method: 1. Use the new keyword to generate. 2. Use the newInstance method of the Class class. 3. Use the newInstance method of the Constructor class.
    JavaBase 6445 2019-12-04 16:31:47
  • How to get the first non-repeating character in a string in java
    How to get the first non-repeating character in a string in java
    The method of "java" to obtain the first non-repeating character in a string is: first obtain the string data input by the user through the "Scanner" class, and then obtain the index and number of the last time a certain character appeared in the string. The index that appears in the string once can be determined by using the "if" statement.
    JavaBase 2650 2019-12-04 16:26:46
  • java error: main class not found or unable to load solution
    java error: main class not found or unable to load solution
    Java error: The main class cannot be found or cannot be loaded. Solution: Use "java package name + class name" to solve the problem. This error occurs because the java command by default searches in the directory specified in the CLASSPATH environment variable when searching for the address of the class file.
    JavaBase 10165 2019-12-04 16:07:43

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!