1. The difference between struts2 and struts12. What is declarative transaction and how is it implemented?3, Ajax two kinds of request method4, Java string str=new string ("ss") created a few objects memory allocation how?Java Virtual machine is divided into heap area, stack area, code area, tree root area, created an object, there is a memory in the heap, save "SS", the value of this string, there is a mem
this abstract method FANGFA () in the main method.Abstract modifierAbstract Class:An abstract class cannot be used to instantiate an object, and the sole purpose of declaring an abstract class is to augment the class in the Future.A class cannot be both abstract and final Decorated. If a class contains an abstract method, the class must be declared as an abstract class, or a compilation error will Occur.Abstract classes can contain both abstract and non-abstract METHODS.Abstract methodsAn abstr
-operatorThe non-operator is denoted by the symbol "~", and its Operation law is as follows:If the bit is 0, the result is 1, if the bit is 1, the result is 0, see a simple example below.public class Data15{public static void Main (string[] args){int a=2;SYSTEM.OUT.PRINTLN ("A non-result is:" + (~a));}}4. Xor operatorThe XOR operator is denoted by the symbol "^", and its Operation law is:The two operand bits, the same result is 0, and the result is 1. Let's look at a simple example.public class
= In.readline ();//read a line of content while(Line! =NULL ) { if(Character.isletter (line)) I++; Else if(Character.isdigit (line)) J++; ElseF++; Line=In.readline (); K++} in.close (); System.out.println ("Letter" +i+ "number" +j+ "Space" +j+ "number of lines" +k)}Catch(IOException iox) {System.out.println ("Problem reading" +fileName); } }}4, if there is a string "6sabcsfs33", with the most rapid way to remove the character "ab3", can not use the
(1) Use of the static field in Java:What is static?It is a Java modifier that defines static variables and static methods.When do you use it?Typically used in tool classes, the static method is modified and then used by other classes of methods.The use method is directly through the class name. method is used, eliminating the hassle of new objects and then calling methods.What to pay attention to?It is important to note that variables and methods are
, if any.(3) Finalize: Method name. Java technology allows the use of the Finalize () method to do the necessary cleanup before the garbage collector clears objects from memory. This method is called by the garbage collector to make sure that the object is not referenced by this object. He is defined in the object class, so all classes inherit from him, and the subclass overrides the Finalize () method to organize system resources or perform other cle
corresponding interceptor), ⑧ the data object into the level two cache; ⑨ returns the data object. What is the difference between the list method and the iterate method of the 14.Query interface? A: Each object returned by the ①list () method is complete (each property in the object is populated with a field in the table), the list method cannot take advantage of the cache, it is write-only to the first-level cache, and the ②iterate method can take full advantage of the first-level cache, which
corresponding interceptor), ⑧ the data object into the level two cache; ⑨ returns the data object. What is the difference between the list method and the iterate method of the 14.Query interface? A: Each object returned by the ①list () method is complete (each property in the object is populated with a field in the table), the list method cannot take advantage of the cache, it is write-only to the first-level cache, and the ②iterate method can take full advantage of the first-level cache, which
particular pointcut and recalls the method of the original object.There are two main ways of dynamic Proxy in Spring AOP, JDK dynamic agent and CGLIB dynamic agent.
The JDK dynamic agent receives the Proxied class through reflection, and requires that the class being proxied must implement an interface. The core of the JDK dynamic agent is the Invocationhandler interface and the proxy class.
If the target class does not implement an interface, Spring AOP chooses to use CGLIB to dyn
objects. Does the run start the thread?The thread's Start method can only start the thread and let the thread ready state. 7,synchronized keyword.Used to lock objects and methods or blocks of code, and at most one thread at a time executes the code. 8,final. Three No. 9,stringbuilder,stringbuffer[synchronized], the difference?StringBuilder is more efficient and thread insecure. 10,hashmap is a hash table or hash list,A hash table is actually an array. Each element in the array is a single-linke
(): Waits for thread to end, can implement thread to execute sequentially
Write a thread-safe singleton modelHttps://www.cnblogs.com/x_wukong/p/3962315.htmlString, StringBuilder, stringbuffer three differences
Operating speed/execution speed: StringBuilder > StringBuffer > String
Strings are string constants (char-saved) and cannot be changed after the object is created, and the first two are string variables, which are reference types and can be changed.
Thre
row of the subclass construction method, otherwise the compilation does not pass. The first statement of each subclass construction method is implicitly called super (), and if the parent does not have this form of constructor, it will be error-free at compile time.6) Super () is similar to this (), except that super () calls the constructor of the parent class from the subclass, and this () invokes other methods within the same class.7) Super () and this () must be placed in the first line of
parent class is overwritten.6. The difference between Collection and collections(1) collection is the ancestor interface of the collection class, and the main interface of inheriting with him is set and list.(2) Collections is a helper class for a collection class that provides a series of static methods for searching, sorting, threading, and so on for various collections.7.Java anomalies (including exception and error) are categorized as checked exc
include in a JSP? 1. Dynamic inclusion: Use 2. Static inclusions: Note: This error can occur in daily development:The Code of Method _jspservice (HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limitThe error is that the JSP file failed to compile too large. The workaround is to introduce the JSP file dynamically, splitting the JSP fileWhat are the similarities and differences between JSP and servlet, and what is the connection between them? JSP is the extension of servlet
Questions on Java basic plane1. Basic Java Type (8) the number of bits and bytes per base typeBYTE 1 byte 8 bitShort 2 bytes 16 bitint 4 bytes 32 bitsLong 8 bytes 64 bitChar 2-byte 16-bitFloat 4 bytes 32 bitDouble 8 bytes 64 bitsBoolean 1 byte 8 bit2, int and integer differenceInteger is the wrapper class for int, and int is a basic data type of JavaAn integer variable must be instantiated before it can be
Overview: still doing an interview without preparation? Still worried about not finding Java's face test? Then you must not miss the following small compilation for your tailor-made Java face question set! Let's take a look!Here are 10 classic Java interview questions, as well as a small list of the answers for everyon
Description: The content of this article is to read the "deep understanding of Java Virtual Machine: JVM advanced features and best practices" to add to the impression and understanding, then recorded the important content. 1 straight to the pointI used to see a Java face test, but I thought it was simple, but I ran the code, but the result was not what I imagine
in spring? What is di?For:IOC is control reversal, so-called inversion refers to the application itself is not responsible for the creation and maintenance of dependent objects, and this task to the third party is the spring to deal with, this is the right to create objects to the third party, control reversal is the transfer of control rightsdi is a dependency injection. Dependency injection, the spring dynamically injects dependent objects into the component during the run.When the IOC contai
Thread A prints the digital 0--12;Thread B prints the letter a--z;Print Result: 0ab1cd2ef3gh4ij5kl6mn7op8qr9st10uv11wx12yzRequired to use the line threads transmission value;Analysis: Thread A prints a number, thread B prints two letters, makes 13 loops,Threads the value of a line through a public resource classpublic class Fftthreadtest {public static void Main (string[] args) {//Create final Resource object final business business = new Business (); Char c= ' a ';for (int i=0;iBusiness class:
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.