Read about core java volume ii advanced features, The latest news, videos, and discussion topics about core java volume ii advanced features from alibabacloud.com
of out-of-heap memory.Here are some practical experiences, in addition to the Java heap and the permanent generation of memory:Direct Memory: Can be resized by-xx:maxdirectmemorysize and thrown OutOfMemoryErroror Outofmemoryerror:direct buffer memory.Thread stacks: Can be resized by-XSS and thrown stackoverflowerror when out of memory (cannot be allocated vertically, i.e. new stack frames cannot be allocated)Socket buffers: Each socket connection is
This article is uploaded to the code cloud source code, please click LambdaExpression get. The lambda expression is a new feature of Java 8, and this article explains all the knowledge of lambda expressions. It covers what lambda expressions are, where lambda expressions are used, lambda expressions in GUI applications, lambda expression syntax, variable access permissions, target types, serialization, method references, and so on.Java
). Class);}If we annotate with annotations, we get the space ID saved in the annotations through annotations, and we use the Mainactivity instance to set the click Listener for it, and invoke the method of annotation annotation within the listener.Private Static intGetviewid (method) {returnMethod.getannotation (OnClick.class). Value ();}Private Static voidSetonclicklistenerforcontrol (FinalActivity activity,FinalMethod method,intViewID) {Activity.findviewbyid (ViewID). Setonclicklistener (NewV
code to maximize the reuse of the same validation rule. Need to use Validator-rules.xml and validation.xml files, validator-rules.xml file contains a set of common validation rules, generally do not need to modify, directly deployed in the corresponding Web-inf folder; Validation.xml by the Open By the sender.For details, please see:Http://www.blogjava.net/nokiaguy/archive/2009/02/12/254421.htmlInternationalization Example Simple login system: Http://pan.baidu.com/s/1bnhKAcRThe main components
RMI and corbr are two distributed network programming methods.
1. Rmi is easy to use. It only supports Java, and service expansion is okay.
2. corbr is complex and supports multiple platforms and languages, but the service expansion is insufficient.
COM/DCOM is a Distributed Component Technology launched by Microsoft. It only supports the Windows platform and has a broad market of Microsoft.
RMI ApplicationProgramAfter compilation, stub and skel
;" +integer.tooctalstring (10));SYSTEM.OUT.PRINTLN ("16 binary 10 corresponding data----->" +integer.tohexstring (10));}/*** 5.valueOf* Convert basic data types to corresponding packaging----> boxing* Xxxvalue 8 package types are available.* Convert XXX type to corresponding basic data type---> Unboxing */@Testpublic void Test05 () {int num=3;Integer i=integer.valueof (num);Num=i.intvalue ();}/*** 6. Classic Face Test* because integer.valueof (num) caches data between -128~127* If our data is in
loop, but it is possible to use his remove () method to delete a qualifying element using the traditional iterator interface traversal.
foreach statement format: for (element type T element variable x: Traverse object obj) {References x's Java statement;} Here are two examples of simple examples of how foreach simplifies programming. The code is as follows: One, the foreach simplifies the array and the collection's traversal import java.u
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.