current location:Home > Technical Articles > Java > JavaBase

  • Java determines whether the socket is connected
    Java determines whether the socket is connected
    In java, you can use the sendUrgentData method in the socket class to determine whether the socket is connected. If the SO_OOBINLINE attribute of the socket is not turned on, an exception will be thrown in java.
    JavaBase 4071 2020-01-14 13:21:38
  • What to do if java files are written with garbled characters
    What to do if java files are written with garbled characters
    Java method to avoid writing garbled files into files: Use the OutputStreamWriter() method to write files. In OutputStreamWriter, you can complete reading and writing gbk files by specifying the encoding method.
    JavaBase 2583 2020-01-13 16:35:08
  • Solution to java parameter garbled problem
    Solution to java parameter garbled problem
    Solution to the problem of garbled java parameters: 1. Use the request.setCharacterEncoding() method to specify the encoding used when obtaining parameters in the post method. 2. Manually specify the parameter encoding when submitting data using the get method.
    JavaBase 1990 2020-01-13 16:11:01
  • How to determine whether a string is empty or null in java
    How to determine whether a string is empty or null in java
    The method to determine whether a string is empty or null in Java is: 1. Use the [if(str.length() == 0)] or [if(str.equals(" "))] method to determine whether the string is empty. ;2. Use the [if(str == null)] method to determine whether the string is null.
    JavaBase 5127 2020-01-15 10:24:42
  • How to determine whether Chinese characters are garbled in Java
    How to determine whether Chinese characters are garbled in Java
    How to determine whether Chinese garbled characters are garbled in Java: We can use the regular expression "\\s*|t*|r*|n*" to match the garbled characters in the string, and then determine whether it is by judging the length of the string that meets the matching rules. There are garbled characters.
    JavaBase 3559 2020-01-09 10:34:42
  • How to generate java project into jar file
    How to generate java project into jar file
    How to generate a java project into a jar file in java: 1. The eclipse tool generates a jar file, select your project, right-click to export, and export the project as a jar file. 2. Convert java files to jar files through the jar command.
    JavaBase 4403 2020-01-09 09:48:31
  • What is the principle of polymorphism in java
    What is the principle of polymorphism in java
    The principle of polymorphism in Java is: the invocation of object methods in Java is implemented by relying on the method table in the class information. When a method of an object is called, the JVM searches the method table of the object class to determine the direct reference address of the method. , the method is actually called only after having the address.
    JavaBase 4682 2020-01-02 10:12:20
  • How to determine whether strings are equal in java
    How to determine whether strings are equal in java
    How to determine whether strings are equal in Java: 1. Use [==] to determine, but you need to pay attention to the situations of [String a = "abc"] and [String a = new String("abc")]; 2. Use [equals] method to judge.
    JavaBase 2680 2020-01-02 09:35:58
  • How to determine whether a string exists in a list collection in java
    How to determine whether a string exists in a list collection in java
    The way to determine whether a string exists in a list collection in Java is: you can use the contains method, which returns true if it exists, otherwise it returns false, for example [boolean bool = list.contains("12")].
    JavaBase 12204 2019-12-31 16:59:52
  • How to package java program into jar file
    How to package java program into jar file
    The method to package a java program into a jar file is: 1. First select the project, right-click, and select [export]; 2. Then select [jar file] and select the project to be packaged; 3. Then select the path to save the jar file package , click [finish] to complete packaging.
    JavaBase 4324 2019-12-31 16:51:27
  • The difference between references in java and pointers in c++
    The difference between references in java and pointers in c++
    The difference between references in Java and pointers in C++ is: 1. References have no entity when declared and do not occupy space, while pointers are assigned values ​​only after they are used, and memory is not allocated when not used; 2. References The initial value is the java keyword null, and the pointer is int.
    JavaBase 2412 2019-12-31 16:38:26
  • Why can't java be installed? How to solve?
    Why can't java be installed? How to solve?
    The reason is: the "JDK" environment does not correspond to the operating system or the installation directory is wrong. The solution is: first make sure that the downloaded "JDK" environment corresponds to your own operating system, and then when installing the "JDK" environment, make sure that the installation path of "JRE" is not under the file path of "JDK".
    JavaBase 4969 2019-12-31 11:11:34
  • Can java delete list elements?
    Can java delete list elements?
    Java can delete list elements. Methods: 1. Use the remove() method of Iterator; 2. Use the remove() method of List, paying attention to the position of list.size(); 3. Use CopyOnWriteArrayList.
    JavaBase 2196 2019-12-31 10:54:12
  • How to get the first few digits of a string in java
    How to get the first few digits of a string in java
    How to get the first digits of a string in java: 1. Use the subString() method to intercept the string. subString provides different interception methods through different parameters, such as using substring(0,4) to intercept the first 4 digits. 2. Intercept through the methods provided by StringUtils.
    JavaBase 30116 2019-12-31 10:46:59
  • What types of streams are there in java?
    What types of streams are there in java?
    Types of streams in Java: According to the direction of the stream: input stream and output stream. According to the implementation functions, there are: node flow and processing flow. According to the unit of data processing, there are: byte stream and character stream.
    JavaBase 3463 2019-12-30 17:41:11

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!