current location:Home > Technical Articles > Java > JavaBase

  • How to instantiate in java?
    How to instantiate in java?
    Using an already defined class in Java, the process of creating an object of this class is called "instantiation". Method of instantiation: 1. Create an object using the new() method of the class to implement instantiation. 2. Use the clone method to create an object. 3. Use the Class.forName method to obtain the class, and then call the newinstance() method of the class.
    JavaBase 3052 2019-12-03 14:04:47
  • Introduction to the method of judging whether it is English in java
    Introduction to the method of judging whether it is English in java
    How to determine whether a string is in English in java: 1. In java, you can use the regular expression "[a-zA-Z]+" to determine whether a string is all in English. 2. Use the regular expression ".*[a-zA-z].*" to determine whether the string contains English.
    JavaBase 7588 2019-12-03 13:52:34
  • How to copy files in java?
    How to copy files in java?
    How to copy files in java: 1. Use FileStreams to copy, use FileInputStream to read the bytes of file A, and use FileOutputStream to write to file B. 2. Use FileChannel to copy. 3. Use Commons IO replication.
    JavaBase 8779 2019-12-03 13:35:39
  • How to determine whether a character is a number in java
    How to determine whether a character is a number in java
    How to determine whether a character is a number in java: 1. Use Character.isDigit(char) to determine. 2. Force the characters to be converted into numbers. If the input character is a number, it will return true. If an exception is thrown, it will return false. 3. Use regular expressions to judge.
    JavaBase 14878 2019-12-03 13:18:21
  • What is java map?
    What is java map?
    Map in Java is an interface. It does not inherit any other interface. Map provides a storage collection of dual-column mappings, which can provide one-to-one data processing capabilities. The first column in the dual columns is called key. , the second column is value.
    JavaBase 4498 2019-12-03 11:56:09
  • Java method to determine whether it is a prime number (prime number)
    Java method to determine whether it is a prime number (prime number)
    How to determine whether it is a prime number (prime number) in java: first use the if(src%2==0) statement to determine whether it is an even number. If it is not an even number, use the for(int i=3;i<=sqrt;i+=2) statement Use the src%i statement to judge. If it cannot be divided evenly, it is a prime number.
    JavaBase 9873 2019-12-03 11:35:24
  • Solution to garbled characters in java when running cmd
    Solution to garbled characters in java when running cmd
    Solution to garbled characters in java when running cmd: 1. Use the -encoding parameter to specify the encoding method when using the command in cmd to run the java file. 2. Add the "AVA_TOOL_OPTIONS" variable to the system variables of the environment variables and set the encoding format.
    JavaBase 10408 2019-12-03 11:19:23
  • Introduction to solutions to garbled file names in Java downloads
    Introduction to solutions to garbled file names in Java downloads
    Solution to garbled java download file name: 1. Use the URLEncoder.encode() method to UTF8 encode the filename, and the file name will be converted to Unicode encoding. 2. Convert the file name to ISO8859-1 encoding through the byte conversion method.
    JavaBase 1840 2019-12-03 10:53:54
  • Introduction to rsa garbled characters in java
    Introduction to rsa garbled characters in java
    When using rsa for encryption and decryption in Java without encoding, the problem of Chinese garbled characters will occur. Solution: When using rsa encryption or decryption, use the String.getBytes() method to transcode the encrypted or decrypted content.
    JavaBase 2950 2019-12-03 10:43:25
  • Solution to garbled url in java
    Solution to garbled url in java
    Solution to garbled URLs in Java: Use the encode() or encodeURI() method to convert Chinese characters into hexadecimal characters before passing parameters. After receiving the parameters, use the decode() method to convert hexadecimal characters into Chinese to solve the URL garbled problem.
    JavaBase 2450 2019-12-03 10:29:28
  • What is file in java?
    What is file in java?
    File in java is a file class that can be used to add, delete, and search for certain types of files or folders. At the same time, it can be comprehensively utilized according to the characteristics of its member variables to avoid errors across systems, and it is best to enter when searching. Absolute path to avoid non-existent files.
    JavaBase 3739 2019-12-03 10:16:49
  • Reasons and solutions for 400 errors reported in Java projects
    Reasons and solutions for 400 errors reported in Java projects
    Reasons why Java projects report 400 errors: 1. The field names or types submitted in the front end are inconsistent with those in the backend, resulting in 400 errors. 2. The front end did not convert the submitted object into a string. Solution: 1. Ensure that the field name types are consistent. 2. Convert the object passed by the front end into a string.
    JavaBase 11819 2019-12-03 10:08:40
  • Detailed explanation of the method of judging whether it is a number in java
    Detailed explanation of the method of judging whether it is a number in java
    How to determine whether it is a number in Java: 1. First define the regular expression "[0-9]*", and then use the matcher() method to match the regular expression to determine whether it is a number. 2. Use the isDigit() function to determine. 3. Determine whether a character is a digit or not by its ASCII code value.
    JavaBase 4739 2019-12-03 09:54:13
  • How to export Excel from Java
    How to export Excel from Java
    How to export Excel in Java: You can use the Jakarta POI HSSF API component in java to implement Excel export. 1. Use HSSWorkbook to create Excel file objects and sheet objects. 2. Return the row object and get the cell object. 3. Use cell objects to read and write.
    JavaBase 4215 2019-12-03 09:44:27
  • How to get input in java?
    How to get input in java?
    Methods to obtain input in java: 1. Use the System.in.read() method to obtain the input characters from the console. 2. Use the BufferedReader class and the InputStreamReader class to get the input string from the console. 3. Use the Scanner class to obtain input.
    JavaBase 8543 2019-12-03 09:21:34

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!