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 assign value to java array
- Methods of assigning values to arrays in Java: 1. Use new to specify the size of the array and then assign a value to the array. This method only determines the value when assigning a value to the element. 2. Use new to specify the value of the array element. This method has already determined the value during initialization. 3. Directly specify the value of the array element.
- JavaBase 19323 2019-11-22 16:21:38
-
- How to draw simple graphics in java
- The method of drawing simple graphics in java is: first we need to import the "Graphics" class into the code. The "Graphics" class will provide a method of drawing a straight line in the coordinate system of the graphics context, and then add member variables for Describe the characteristics of the game area, and finally add a method to draw the game area.
- JavaBase 6959 2019-11-22 16:18:20
-
- Solve the problem of Chinese garbled file name in java download
- Solution to the Chinese garbled file name of Java download: It can be solved by changing the encoding format of the file name. Different browsers have different solutions. 1. In IE browser, filename is UTF8 encoded through URLEncoder. 2. Other browsers convert bytes to ISO8859-1.
- JavaBase 4421 2019-11-22 16:06:48
-
- Java determines whether the object is of type string
- How to determine whether an object is of string type in Java: 1. Use the instanceof operator to determine whether the object is an instance of the string type. 2. Use getClass to get the type of an instance, and then use getName():String to get the full name of the type to judge.
- JavaBase 10045 2019-11-22 15:41:47
-
- Java determines what day it is today
- How to determine what day of the week today is in Java: Use the date method to get the day of the week, and then use the Calendar class to get the day of the week. The week obtained by this method starts on Sunday. Or use SimpleDateFormat to format the date to get the day of the week.
- JavaBase 6521 2019-11-22 15:19:31
-
- Solution to Java compilation garbled code
- Solution to garbled code in java compilation: 1. Add parameters when executing the java compilation command to solve the garbled code. The compilation command: javac -encoding gbk -d Run.java. 2. Modify the language environment configuration of the entire operating system to solve the compilation garbled code.
- JavaBase 4449 2019-11-22 14:54:42
-
- Solve the problem of garbled characters when passing Chinese parameters from js to java background
- The way to solve the problem of garbled characters when js transmits Chinese parameters to the java backend is: first, we encode the Chinese parameters when passing the value in js, then start to transmit the encoded Chinese parameters to the java backend, and finally the java backend obtains Just decode the Chinese parameters.
- JavaBase 2032 2019-11-22 14:38:36
-
- Java post request garbled solution
- Solution to the garbled post request in Java: Enter request.setCharacterEncoding("utf-8"); on the requested page to solve the garbled post request. Post requests must be used when uploading files. Post requests have no length limit and are more secure.
- JavaBase 8277 2019-11-22 14:37:11
-
- Does java this access member variables?
- In Java, you can use the this keyword to specify the data for accessing member variables. Use this to handle the situation where the member variables and parameter variables in the method have the same name. Use the this keyword in the method definition of the class to represent the reference of the object using the method.
- JavaBase 3504 2019-11-22 14:23:03
-
- Can static methods in java be inherited?
- Static properties and static methods in Java can be inherited, but they are not rewritten but hidden. The reason is that static methods and static properties belong to classes and are called directly through "class name.method name". , can be called without inheritance mechanism.
- JavaBase 4542 2019-11-22 14:11:53
-
- Java url parameters are garbled
- Java method to solve garbled url parameters: Use "URLEncoder.encode(parameter, "UTF-8")" when splicing url parameters on the first page, and get the parameter from the request on the second page to solve the garbled url.
- JavaBase 2506 2019-11-22 14:07:49
-
- Solution to garbled characters when url is transmitted to Chinese in Java
- Solution to java url Chinese garbled code: 1. Use the encode() method to encode the Chinese characters to be transmitted in the URL. 2. Decode the characters on the page where the URL is passed to Chinese characters.
- JavaBase 1833 2019-11-22 14:00:06
-
- How are functions (methods) called in java
- The calling method of functions (methods) in Java is: for non-static methods, they are called through the object, for example: "Object name. Method ()"; for static methods, they are called through the class name, for example: "Class name.method()".
- JavaBase 4600 2019-11-22 13:54:26
-
- How to determine whether a string is an integer in java
- How to determine whether a string is an integer in Java: 1. Use the isDigit function to determine whether the characters in the string are all numbers. 2. Use the regular expression "[0-9]*" or "^-?[0-9]+" (can judge negative numbers) to judge.
- JavaBase 5387 2019-11-22 13:41:00
-
- How to determine whether a string contains English in java
- The way to determine whether a string contains English in Java is to first define a regular expression, for example: ".*[a-zA-z].*", and then call the "matches" method through the string object to match the regular expression. Yes, for example: "matches(regex)".
- JavaBase 6986 2019-11-22 13:28:50