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:
-
- What are the types of errors in java?
- Error types in Java can be abstractly divided into three categories, which are: 1. Syntax errors, which are caused by input that does not conform to the grammatical rules during programming; 2. Run errors, which occur during the running of the program; 3. Logic errors, which occur when the program is running. Get the expected results.
- JavaBase 10613 2019-11-13 15:45:40
-
- or how to express it in java
- The representation method of or in Java is "||", two vertical lines, above the enter key on the keyboard. "||" is a logical operator in Java. It is followed by Java expressions. When any expression is true, the result is true.
- JavaBase 24776 2019-11-13 15:33:14
-
- How to write java in jsp
- How to write java in jsp: 1. Use "<%!declaration statement%>" for declaration statements, usually global variables, constants, methods; 2. Use "<%java code%>" for writing local variables and java statements; 3. Use "<%=java code%>" for jsp expression, please note that it cannot be followed by a semicolon.
- JavaBase 2726 2019-11-13 15:14:40
-
- What are the common exceptions in java
- Several common exceptions in Java are: 1. NullPointerException; 2. ClassCastException type cast exception; 3. ArrayIndexOutOfBoundsException array subscript exception.
- JavaBase 2830 2019-11-13 15:11:57
-
- Several common exceptions in java
- Several common exceptions in Java are: 1. NullPointerException; 2. ClassCastException type cast exception; 3. ArrayIndexOutOfBoundsException array subscript exception.
- JavaBase 1981 2019-11-13 15:10:12
-
- The difference between Android and Java
- The differences between Android and Java are: 1. Android is an operating system for smartphones, and Java is a development language; 2. Android development is a branch of Java development, and some of their class libraries have the same names, but they are not identical; 3. Android Applications in the application layer are developed in Java, which provides the language environment for Android and so on.
- JavaBase 2060 2019-11-13 15:00:48
-
- How to define interface in java
- The syntax format for defining an interface in Java is: public+interface interface name{}. It should be noted that the methods in the interface are abstract methods, and all variables are constants and must be assigned values.
- JavaBase 3354 2019-11-13 14:59:38
-
- Solution to garbled characters when reading text files in Java
- Solution to garbled characters when Java reads text files: 1. First, set the encoding format of the text file to be read to UTF-8; 2. Use the InputStreamReader class to read the file and specify its character set as UTF- 8 format.
- JavaBase 3127 2019-11-13 14:47:40
-
- Java case insensitive comparison
- Java case-insensitive comparison method: Use Java's built-in function equalsIgnoreCase to perform comparison, for example, "ABC".equalsIgnoreCase("abc"); will return true.
- JavaBase 11531 2019-11-13 14:47:02
-
- The difference between heap and stack java
- The difference between heap and stack: 1. Stack memory stores local variables while heap stores entities; 2. Stack memory updates faster than stack; 3. Variables stored in stack memory will be released at the end of their life cycle, and the heap will be discarded by the garbage collection mechanism. Regular recycling.
- JavaBase 4381 2019-11-13 14:32:20
-
- Java determines whether it is a palindrome number
- How to determine the number of palindromes in Java: First, use Scanner to obtain the string input by the user; then create a StringBuffer character buffer object and use reverse to invert the string content; then use a for loop to detect the number that is the same as the corresponding position of the original string; finally, according to The same number can be judged.
- JavaBase 3461 2019-11-13 14:20:17
-
- How to determine whether an object is empty in java
- The method to determine whether an object is empty in Java is: first use object==null to determine. When the object is null, it returns true, otherwise it returns false. Then when object!=null is true, further determine whether all properties of the object are null.
- JavaBase 13514 2019-11-13 14:10:22
-
- How to close java program
- How to close a java program: First use Thread.currentThread() to get the current thread; then use the interrupt method to exit the program. If there are multiple threads in the program, you can use System.exit(0) to completely exit the program.
- JavaBase 8680 2019-11-13 14:06:24
-
- How to create a new java file
- How to create a new java: 1. Open the Eclipse program; 2. Click file-new-java project on the upper left to create a new project; 3. Click File-New-Package to create a new project package; 4. Right-click new- in the src folder on the left class can be used to create a class.
- JavaBase 9216 2019-11-13 13:50:23
-
- How to determine whether a character is a number in java
- The method to determine whether a character is a number in Java is: 1. Use the regular expression "[0-9]*" to check whether the character is a number; 2. Use the function Character.isDigit that comes with Java to determine whether the character is a number; 3. , use indexOf index to determine whether the character is a number.
- JavaBase 6051 2019-11-13 13:48:58