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 write java program
- How to write a java program: first open notepad and enter the code "public class helloworld{...}"; then save the file name as "HelloWorld.java"; then open the cmd command window and enter the command "javac HelloWorld" that is Can.
- JavaBase 4385 2020-04-11 10:19:47
-
- How to set up java
- How to set up java: first right-click "My Computer"; then select "Properties" - "Advanced System Settings" - "Advanced" - "Environment Variables"; then add three system variables, namely "JAVA_HOME, PATH, CLASSPATH"; finally save the settings.
- JavaBase 3297 2020-04-11 09:31:14
-
- Solution to garbled characters in java
- Solution to garbled characters in java: first add the code "<%@ page language="java" charset=UTF-8">" at the beginning of each page; then copy the "TOMCAT" installation directory to "webapp/filters" That’s it.
- JavaBase 2950 2020-04-11 09:20:47
-
- What to do if java base64 is garbled
- The solution to java base64 garbled code: first modify the front-end page, the code is "var sendData={...}"; then set the encoding of the background file, the code is "URLDecoder.decode(Encodes.decodeBase64String)".
- JavaBase 4037 2020-04-07 09:51:28
-
- The difference between java and java web
- The difference between java and java web: 1. Java generally refers to JavaSE, which is "Java Standard Edition", the standard version of Java, which is generally used to develop desktop applications; 2. JavaWeb belongs to the JavaEE field, which is the enterprise version of Java.
- JavaBase 5123 2020-04-05 10:00:59
-
- What to do if java utf-8 garbled characters
- The solution to java utf-8 garbled code: first write the code "<%@ page language="java" contentType="text/html; charset=utf-8"..." in the header of html; then modify the garbled project file attributes Just modify it.
- JavaBase 2914 2020-04-05 09:32:37
-
- Java implements double to retain two decimal places after the decimal point
- The method for Java to realize double retaining two decimal places after the decimal point is: 1. Rounding, for example [d = (double) Math.round(d * 100) / 100]; 2. %.2f, for example [String.format("% .2f", d)].
- JavaBase 7876 2020-02-10 11:25:51
-
- How to determine whether long type characters are equal in java
- The method for Java to determine whether long type characters are equal is: you can directly use the equals method for comparison, such as [if (obj instanceof Long){return value == ((Long)obj).longValue();}].
- JavaBase 5672 2020-02-05 11:42:51
-
- Use the while statement to find the sum of odd numbers from 1 to 100 in java
- The method to use the while statement to find the sum of odd numbers from 1 to 100 in Java is: 1. First define the variable i (initial value is 1) and the variable sum (initial value is 0); 2. Then use the while statement to make the judgment, for example [while(i<100){sum+=i;i+=2}].
- JavaBase 20479 2020-02-05 09:50:39
-
- file.delete() in java cannot delete files
- The solution to the problem that file.delete() in Java cannot delete a file is: 1. Close the relevant stream operation or process; 2. Pass [new file ("absolute path of the file")], and then execute [file.delete()] Just delete it.
- JavaBase 4773 2020-02-04 16:13:31
-
- How to call member variables and member methods of objects in Java
- The method for objects in Java to call member variables and member methods is: 1. Call member variables: [Object name. Member variable]; 2. Call member methods: [Object name. Member method ()], such as [student.study() ] or [student.eat()].
- JavaBase 7942 2020-02-04 14:52:59
-
- What is the difference between Java reference and C pointer
- The difference between Java references and C pointers is: 1. A pointer can change the value it points to at runtime. Once a reference is bound to an object, it cannot be changed and always points to the original object; 2. When the reference is declared, there is no Entity, does not occupy space, the pointer will be assigned a value only after it is used, otherwise no memory will be allocated.
- JavaBase 2679 2020-02-04 14:13:59
-
- Compiling java program under cmd prompts that the file cannot be found
- The solution to the problem that the file cannot be found when compiling a java program under cmd is: 1. First open the folder where the java code is stored; 2. Then open the command prompt; 3. Then compile the java program, such as [javac hello.java]; 4. , and finally run the java program, such as [java hello].
- JavaBase 4901 2020-02-03 11:49:54
-
- What does
mean in java - <E> in java means generic, which refers to any type. For example, [Map map=new HashMap<String, String()] means that the declared key and value can only be of String type. Only all Keys and Values in the map are of String type. Only then can it be compiled and passed.
- JavaBase 8331 2020-02-03 11:39:25
- What does
-
- Introduction to several categories in java
- Introduction to several categories in Java: 1. Date class, whose construction methods are [public Date(), public Date(long date)]; 2. Random class, whose construction methods are [public int nextInt(int n)].
- JavaBase 3674 2020-02-03 11:12:56