current location:Home > Technical Articles > Java > JavaBase
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- Java uses regular rules to determine whether it is a number
- Java regular method to determine whether a string is a number: first define the regular expression "^-?\\d+(\\.\\d+)?$", and then use the matches() method to detect whether the string matches the given regular expression You can use the formula to determine whether it is a number.
- JavaBase 4838 2019-12-28 09:27:51
-
- Java method to determine whether socket is disconnected
- How to determine whether the socket is disconnected in java: You can use the sendUrgentData method in the socket class to determine whether the SO_OOBINLINE attribute of the socket is turned on. An exception will be thrown in java.
- JavaBase 3090 2019-12-27 16:51:28
-
- Solution to Chinese garbled characters in Java database
- Solution to Chinese garbled characters in Java database: Add useUnicode=true&characterEncoding=UTF-8 parameters after the URL configured in the database to solve the problem of database garbled characters.
- JavaBase 3815 2019-12-27 16:31:46
-
- How to determine whether two dates are the same day in java
- How to determine whether two dates are on the same day in java: 1. Use the Calendar.YEAR and Calendar.DAY_OF_YEAR methods to determine whether two dates are on the same day in the same year. 2. Use SimpleDateFormat to format the two dates, and then use equals to judge.
- JavaBase 11690 2019-12-27 16:13:58
-
- Java determines whether a date is a weekend
- Use the "get(Calendar.DAY_OF_WEEK)-1" method to obtain the number corresponding to the specified date. When the obtained number is 0 or 6, it means that the date is a weekend. In Java, you can use the Calendar.DAY_OF_WEEK method to get the number corresponding to the day of the week for a specified date, 1-7 corresponds to Sunday to Saturday.
- JavaBase 4203 2019-12-27 15:39:00
-
- What is the difference between wait and sleep in java?
- The difference between wait and sleep in Java: 1. Sleep comes from the Thread class, while wait comes from the Object class; 2. The sleep method does not release the lock, but the wait method releases the lock, allowing other threads to use synchronization control blocks or methods.
- JavaBase 4729 2019-12-27 15:31:17
-
- Java method to determine whether string is a number
- How to determine whether a string is a number in Java: Use the charAt() method in a loop to return the characters in the string one by one, and then use the isDigit() method to determine whether the specified character is a number.
- JavaBase 13832 2019-12-27 14:50:58
-
- What is the difference between html and java?
- HTML and java are essentially different. Java is an object-oriented programming language, and html is hypertext markup language. It is a markup language, not a programming language, and is used in almost all web pages.
- JavaBase 5552 2019-12-27 14:44:32
-
- How to create a folder in java
- In Java, you can use the mkdir() method to create a single folder. When using this method to create a directory, you must ensure that its parent folder exists. Or use the mkdirs() method to create a multi-level directory. This method does not require ensuring that its parent folder exists.
- JavaBase 10564 2019-12-27 14:37:30
-
- Is there any difference between c syntax and java syntax?
- There are differences between c syntax and java syntax, for example: 1. C language has pointers, but java does not have pointers. 2. The identifiers available in C language are numbers, uppercase and lowercase letters, and underscores, which cannot start with a number. In addition to the three types of identifiers in C, the identifiers available in Java have one more dollar sign ($), which also cannot start with a number.
- JavaBase 3089 2019-12-27 14:29:16
-
- How to get ip address in java
- How to get IP in java: You can return the IP address through the HttpServletRequest object, where the getRemoteAddr method returns the IP address of the client that made the request, and the getLocalAddr method returns the IP address of the WEB server.
- JavaBase 7728 2019-12-27 14:27:11
-
- What is the difference between java collection and array?
- Differences: 1. An array declares the type of elements it contains, while a collection does not. 2. Arrays are static. An array instance has a fixed size. Once created, the capacity cannot be changed. Collections can dynamically expand their capacity and change their size dynamically as needed. Collections provide more member methods to meet more needs.
- JavaBase 8357 2019-12-27 14:06:09
-
- Solutions to garbled characters in imported java projects
- Solution to garbled characters when importing java projects: 1. Right-click properties on the project, select Resource, and change Text file encoding. 2. Select Window-preferences-General-Workspace in the IDE and modify the encoding.
- JavaBase 4004 2019-12-27 13:50:52
-
- Java method to determine whether a string contains specified characters
- How to determine whether a string contains specified characters in Java: Use the contains method to determine if and only if the string contains the specified char value sequence, the contains() method returns true.
- JavaBase 10854 2019-12-27 13:36:14
-
- How to package java program
- Packaging java program: 1. Select the class or package you want to export in eclipse, right-click and select the Export sub-option. 2. In the pop-up dialog box, select the java file-JAR file-click next. 3. Select the storage location of the jar package and save it.
- JavaBase 6273 2019-12-27 13:25:35