1 Integer typebyte accounted for 1 bytes (1 bytes in memory 8 bitsShort takes 2 bytesint accounted for 4 byteslong takes 8 bytes2 Floating-point typefloat takes 4 bytesdouble takes 8 bytes3 Character Typechar is 2 bytes, character data is 16-bit
1 Select Sort Principle int[] arr = new int[] {2,4,21,44,10}; The first element of the array is compared to the other elements if the value of the element is smaller then the two values are compared so that the maximum value of the array is the
20. Can interfaces inherit interfaces? Can an abstract class implement (implements) interfaces? Can an abstract class inherit a concrete class (concrete Class)? Is there a static main method in the abstract class?Interfaces can inherit interfaces.
The bottom of the Java character Stream is also implemented using a byte stream, so the byte stream is converted to a character stream at a time. The conversion stream is mainly used tooutputstreamwriter: Convert byte output stream to character
Source: http://www.ibm.com/developerworks/cn/java/j-lo-classloader/The ClassLoader (class loader) is a very important concept in java™. The ClassLoader is responsible for loading the Java class's byte code into the Java virtual machine. In this
Before comparing the client version number, always use String.CompareTo, know that the bug has not understood its imperfect place. Its comparison is performed according to the comparison of strings, so it has an incorrect place. For example, the
1. Java uses the class object to perform its rtti. Each class in Java generates a Class object after compilation (more appropriately, in a. class file of the same name), and even void and the base type correspond to a class object.The JVM uses the
Write API interface, summed up, but this splicing URL of the way, do not know whether it can be used as an API interface to obtain dataFirst add such a configuration to Web. xmlBrandServletcom.test.servlet.testa1BrandServlet/jiekou.aThen fill in the
Exception: Is the description of the problem, the problem is encapsulated object,Abnormal system:Throwable:1.Error2.Exception1.RuntimeExceptionCharacteristics of the anomaly system:All classes in the exception system and the objects created are
In Java, a class can be defined inside another class or inside a method, and such a class is called an inner class. The inner class is still a separate class, and after compilation The inner class is compiled into a separate. class file, but
1, the single quotation marks the data is a char type, double quotation marks the data is a string type, single quotation marks can only one character, and double quotation marks may be cited 0 and above. Char is just a basic type, and string can be
Problem:The I-J is not swapped in the computed column and the result of the output error is:for (int i=0;i{for (int j=0;jg[i]+=a[j][i];//error: G[i]+=a[i][j];g[i]=g[i]/n;In addition, the definition of three double arrays causes memory to be exceeded,
1:voliate Used in multi-threading, synchronous variables. thread to improve efficiency, the member variable (such as a) a Copies a copy (such as B), and the access to a in the thread actually accesses B. Synchronization of A and B occurs
Recently in doing some coding and decoding related things, but also encountered the conversion of byte and int, looking at those about anti-code, the complement of instructions still headache, or write down some practical methods.byte, intCoercion
Spring load hot deployment Java Application project, java hot deployment
For O & M personnel, hot deployment is a problem that often needs to be considered. In short, hot deployment takes effect immediately after modification to a local file or a
Establish a TCP connection through UDP and a TCP connection through UDPExplanation
Query the Server IP address through UDP broadcast, and then establish a TCP point-to-point connection.Application scenarios
When the IP address of the server is
Thinking in JAVA notes-Chapter 5 initialization and cleanup, thinkingjava
5.1 use the constructor to ensure initialization.
To ensure security, force initialization before use
The Java constructor and the class name are the same. The non-parameter
Why does java use char array to store passwords?I have written several basic blogs recently, so they are quite popular.Everyone who uses swing knows the getPassword () method of password field and returns char [] instead of String.If PKI is
Java: A simple deadlock example
Content: A simple deadlock example, the general idea: two threads A and B, two locks X and Y. Now A gets the lock X first, and then sleep () for A while, we know that sleep () does not release lock resources. Then, if
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service