current location:Home > Technical Articles > Java > JavaBase

  • How to assign value to java array
    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
    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
    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
    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
    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 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
    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
    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?
    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?
    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 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 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
    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
    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
    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

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