current location:Home > Technical Articles > Java > JavaBase

  • How to write java program
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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 <E> mean in java
    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
  • Introduction to several categories in java
    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

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