current location:Home > Technical Articles > Java > JavaBase
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- How to use if statement to determine whether strings are equal in java
- The way to use the "if" statement in "java" to determine whether strings are equal is: you can use the "==" or "equals" method, both of which can compare whether strings are equal, but the difference is that "==" comparison is whether the addresses of the two strings are equal, and the "equals" method compares whether the contents of the string objects are the same.
- JavaBase 17366 2019-11-27 11:55:09
-
- How to use if statement in java to determine whether a string is empty or null
- The method of using the "if" statement in "java" to determine whether a string is empty or "null" is: first check whether the string to be determined is "null", and then determine whether the string is empty by calling the "length" method. Note that this process must first determine that the string is not "null", otherwise an error will be reported.
- JavaBase 7710 2019-11-27 11:30:00
-
- Detailed explanation of determining whether it is a decimal in java (regular method)
- How to determine whether it is a decimal in Java: first define the regular expression "(\\d+\\.\\d+)" (this article details the functions of each symbol of this regular expression), and then use the matches() method to match this regular expression Expression to determine whether it is a decimal.
- JavaBase 4897 2019-11-27 11:22:18
-
- How to solve garbled http request in java
- The method to solve the garbled "http" request in "java" is: you can use the "IOUtils" tool class, first open the connection with the "URL", then set the submission mode when sending the request, and then obtain the "InputStream" through the tool class Convert the stream to a string and set the encoding format.
- JavaBase 3207 2019-11-27 11:15:48
-
- How to determine whether a character is a Chinese character in java
- How to determine whether a character is a Chinese character in Java: In the Java program, use the matches() method to determine whether the character matches the regular expression "[\u4e00-\u9fa5]" to determine whether the character is a Chinese character. \u4e00-\u9fa5 is the encoding of the Chinese character. scope.
- JavaBase 3447 2019-11-27 11:09:10
-
- Java method to determine whether it is a triangle (code attached)
- Whether a triangle can be judged by judging whether the three side lengths can form a triangle, you can directly use the statement if(a+b>c&&a+c>b&&b+c>a) in the java program to judge whether the three side lengths can form a triangle. .
- JavaBase 13421 2019-11-27 10:59:19
-
- How to check whether the specified file in ftp server exists in java
- The method in "java" to check whether the specified file exists in the "ftp" server is: first, you need to connect to the "ftp" server, then set the file type to binary, and set the encoding format, then extract the directory and file name of the absolute address, and finally check Just specify whether the file exists.
- JavaBase 4034 2019-11-27 10:49:05
-
- Introduction to the method of java determining whether the specified element contains an array
- How to determine whether the specified element is in the array in Java: 1. First convert the array into a list or set collection, and then use the contains() method to determine whether the specified element is included. 2. Use a loop to traverse the array to determine whether the array contains the specified element.
- JavaBase 2406 2019-11-27 10:36:04
-
- How to make float type data retain two decimal places in java
- The methods for retaining two decimal places for "float" type data in "java" are: 1. Use the "round" method for calculation, which returns the result in numeric format; 2. Use the "format" method for formatting, This method returns the result in string format.
- JavaBase 8779 2019-11-27 10:16:39
-
- Solution to java error file not found
- Solution to the java error that the file cannot be found: 1. Check whether the environment variables are configured correctly (use the javac command to output the help information to check). 2. Check whether the path of the executed file is correct. 3. Check whether the extension of the executed file is .java.
- JavaBase 16429 2019-11-27 10:13:45
-
- How to determine whether file exists in java
- The method to determine whether "file" exists in "java" is: you can use the "file.exists" method in the "File" class to check. First, you need to import the "File" class, and then save the "file" path that needs to be determined to a In the object, just call the "exists" method at the end to make a judgment.
- JavaBase 3381 2019-11-27 10:01:25
-
- Introduction to the method of determining whether a file exists in java (with code)
- In Java, you can use the file.exists() method of the File class to detect whether a file exists. exists() tests whether the file or directory represented by the abstract path name exists. If and only if the file or directory represented by the abstract path name exists, it returns true, otherwise it returns false.
- JavaBase 3382 2019-11-27 09:57:35
-
- How to make double type data retain two decimal places in java
- The way to keep two decimal places for "double" type data in "java" is: first, you can define an object to save the defined rounding mode, and then use the defined object to call the "format" method to combine the data that needs to be modified with the definition. The rounding mode can be matched.
- JavaBase 15504 2019-11-27 09:46:13
-
- Java method to determine whether it is a date (code attached)
- How to determine whether it is a date in Java: 1. First define a regular expression to determine the date, and then use the matches() method to match the regular expression to determine whether it is a date. 2. Use the SimpleDateFormat class to set the date format, and then determine whether it is a date by throwing an exception.
- JavaBase 5964 2019-11-27 09:46:01
-
- Garbled characters appear when converting byte[] to String in java
- The reason why "byte[]" in "java" is garbled when converted to "String" is due to different encoding standards. The solution is: you can use the common "Base64" encoding specification. The "Base64" encoding specification can convert common characters into 6-bit binary representation, so that standard conversion can be guaranteed.
- JavaBase 10479 2019-11-27 09:28:00