Java Engineer Interview FAQs

Source: Internet
Author: User
Tags sql injection attack thread class singleton class in java csrf attack

1. What are the aspects of object-oriented features?
2, access modifier public,private,protected, and do not write (default) when the difference?
3. Is String the most basic data type?
4. Float f=3.4, is it correct?
5, short S1 = 1; S1 = s1 + 1; Is it wrong? short S1 = 1; S1 + = 1; Is it wrong?
6. Does Java have goto?
7, what is the difference between int and integer?
8, the difference between & and &&?
9. Explain the usage of the in-memory stack (stack), heap, and static area.
10, Math.Round (11.5) equals how much? How much does Math.Round (-11.5) equal?
11. Does switch function on a byte, can it function on a long, and can it function on a string?
12. Calculate 2 times 8 with the most efficient method?
13. Does the array have the length () method? Does the string have the length () method?
14. How do I jump out of the current multiple nested loops in Java?
15. Can the constructor (constructor) be rewritten (override)?
16, two object values are the same (x.equals (y) = = true), but can have different hash code, this sentence right?
17. Can I inherit the String class?
18, when an object is passed as a parameter to a method, this method can change the properties of the object, and can return the changed results, then this is the value of the pass or reference pass?
19, the difference between string and StringBuilder, StringBuffer?
20. The difference between overloading (overload) and overriding (override). Can overloaded methods be differentiated according to the return type?
21. Describe the principle mechanism of the JVM loading class file?
22, Char type variable can not be stored in a Chinese character, why?
23. What are the similarities and differences between abstract class and interface (interface)?
24. What is the difference between static nested classes (the static Nested Class) and inner classes (Inner Class)?
25. There is a memory leak in Java, please describe it briefly.
26. Whether the abstract method can be static at the same time (static), whether it can be a local method (native), and whether it can be synchronized modified at the same time?
27. Explain the difference between static variable and instance variable.
28. Is it possible to make a call to a non-static (Non-static) method from within a static method?
29, how to implement object cloning?
31, String s = new string ("xyz"), how many string objects have been created?
32. Is the interface inheritable (extends) interface? is an abstract class achievable (implements) interface? Can abstract classes inherit concrete classes (concrete Class)?
33. Can a ". Java" source file contain more than one class (not an inner class)? What are the restrictions?
34, Anonymous Inner Class (anonymous inner Class) can inherit other classes? Is it possible to implement an interface?
35. Can an inner class reference a member of its containing class (an outer Class)? Are there any restrictions?
36. What are the uses of the final keyword in Java?
38. Conversion between data types:
39, how to implement the reversal and substitution of strings?
40. How do I convert a GB2312 encoded string to a iso-8859-1 encoded string?
41. Date and Time:
42, print the current moment yesterday.
43, compare Java and javasciprt.
44. When to use assertions (assert)?
45. What is the difference between error and exception?
46. try{} has a return statement, then the code immediately following the try finally{} will not be executed, when executed, before or after the return?
47, the Java language how to do exception handling, keywords: throws, throw, try, catch, finally how to use each?
48. What are the similarities and differences between run-time anomalies and inspected anomalies?
49. List some of your common run-time exceptions?
50, explain the final, finally, finalize the difference.
51, class ExampleA inherit exception, class Exampleb inherit ExampleA.
What is the output of executing this code?
52. Does the List, Set, and map inherit from the collection interface?
53. Describe the storage performance and characteristics of ArrayList, Vector and LinkedList.
54, the difference between collection and collections?
55, List, MAP, set three interface access elements, what are the characteristics of each?
56. How do TreeMap and TreeSet compare elements when sorting? How does the sort () method in the Collections tool class compare elements?
57. What is the difference between the sleep () method of the thread class and the Wait () method of the object that allows the thread to pause execution?
58. What is the difference between the sleep () method of a thread and the yield () method?
59. When a thread enters synchronized method A of an object, can other threads enter Synchronized method B of this object?
60. Describe the methods associated with thread synchronization and thread scheduling.
61, how to write multi-thread program has several implementation methods?
62, the use of synchronized keywords?
63, examples of synchronous and asynchronous.
64. Does starting a thread call the run () or start () method?
65, what is the thread pool (thread pool)?
66, the basic state of the thread and the relationship between the state?
67, briefly describe the similarities and differences between synchronized and Java.util.concurrent.locks.Lock?
68. What is the meaning of how serialization is implemented in Java?
69. Are there several types of streams in Java?
70, write a method, enter a file name and a string to count the number of occurrences of this string in this file.
71, how to use Java code to list all the files in a directory?
72, with the Java socket programming implementation of a multi-threaded echo (ECHO) server.
73. There are several forms of XML document definition. What are the essential differences between them? What are the different ways to parse an XML document?
74. Where do you use XML in your project?
75, elaborated the JDBC Operation database step.
76. What is the difference between statement and PreparedStatement? Which performance is better?
77, how to improve the performance of reading data when using JDBC to manipulate the database? How can I improve the performance of my updated data?
78, in the database programming, what is the connection pool role?
79. What is DAO mode?
80. What is the acid of the business?
81. How does the transaction work in JDBC?
82. Can JDBC handle blobs and CLOB?
83, a brief description of the regular expression and its use.
84. How is the regular expression operation supported in Java?
85. What are the ways to get class objects of a class?
86. How can I create an object from reflection?
87, how to get and set the value of the object private field through reflection?
88. How do I invoke an object by reflection?
89, briefly describe the object-oriented "six principles of law."
90, briefly describe the design patterns you know.
91, write a singleton class in Java.
92. What is UML?
93. What are the common diagrams in UML?
94, write a bubble sort in Java.
95, write a binary in Java to find.

96. Describe the difference between servlet and CGI?
97. What are the methods in the Servlet interface?
98. What is the difference between forwarding (forward) and redirection (redirect)?
99. What are the built-in objects of JSP? What are the roles?
100. What are the differences between get and post requests?
101. What are the common Web servers?
102. What is the relationship between JSP and servlet?
103, explain the JSP four kinds of scopes.
104, how to implement the single-threaded mode of JSP or servlet?
105. What are the techniques for implementing session tracking?
106. What are the functions and usages of filters?
107. What are the functions and usage of listeners?
108. What can I configure in the Web. xml file?
109. What jstl tags are used in your project?
110. What are the benefits of using the tag library? How do I customize my JSP tags?
111, say the expression language (EL) of the implicit object and its role.
112. What operators are supported by the expression language (EL)?
113. What is the Model 1 and Model 2 of Java Web development referring to respectively?
114. What does asynchronous processing in Servlet 3 refer to?
115, how to implement file upload and download in Java-based Web project?
116, the server receives the user submits the form data, in the end is calls the servlet doget () or the Dopost () method?
117, what is the difference between static inclusion and dynamic inclusion in JSP?
118. How do I get user-submitted query parameters or form data in a servlet?
119. How do I get user-configured initialization parameters and server context parameters in the servlet?
120. How to set the encoding of the request and the type of the response content?
121, explain the network application mode and its characteristics.
122. What is Web service (Web services)?
123. Conceptual interpretation: SOAP, WSDL, UDDI.
124. What are the specifications related to Web service in the Java specification?
125. Introduce the Web service framework of the Java domain you know.


126. What is ORM?
127. What are the issues to be considered in durable layer design? What is the persistence layer framework you have used?
128. Is sessionfactory thread-safe in hibernate? is the session thread-safe (can two threads share the same session)?
129. What is the difference between the load and get methods in hibernate session?
130. What is the Save (), update (), merge (), lock (), Saveorupdate (), and persist () methods of the session respectively? What's the difference?
131. The process of loading entity object in session is expounded.
132. What is the difference between the list method and the iterate method of the query interface?
133, hibernate how to realize paging query?
134. What is the use of lock mechanism? The pessimistic lock and optimistic locking mechanism of hibernate are briefly described.
135. Describe the three states of the entity object and the transformation relationship.
136. How to understand the lazy loading mechanism of hibernate? In practical applications, how is the contradiction between delayed loading and session closure handled?
137. Give an example of many-to-many associations, and show how to implement many-to-many correlation mappings.
138, talk about your understanding of the inheritance map.
139, briefly describe the common optimization strategy of hibernate.
140. Talk about Hibernate's first level cache, level two cache, and query cache.
141, hibernate in Detachedcriteria class is what?
142. What is the function of the Mappedby attribute of @OneToMany annotations?
143. What is the difference between using <code>#</code> and <code>$</code> writing placeholders in MyBatis?
144. Explain the role of the MyBatis namespace (namespace).
145. What does dynamic SQL mean in MyBatis?
146. What is IOC and di? How is di implemented?
147. What are the scope of beans in spring?
148, explain what is called AOP (aspect-oriented programming)?
149. How do you understand the concept of "crosscutting concerns"?
150. How do you understand the concepts of connection points (Joinpoint), pointcuts (Pointcut), Enhancements (Advice), primers (Introduction), weaving (Weaving), facets (Aspect) in AOP?
151. What are the ways of automatic assembly in spring?
152. How do I use annotations to configure beans in spring? What are the relevant annotations?
153. What are the types of transaction management supported by spring? Which method do you use in your project?
154. How do I configure Spring's IOC container in a Web project?
155. How do I configure Spring MVC in a Web project?
156. How does Spring MVC work?
157. How do I configure the data source in the spring IOC container?
158. How do I configure the configuration transaction enhancements?
159. Why do you choose to use the Spring framework (what are the benefits of the spring Framework for enterprise development)?
160. How does the Spring IOC container configure beans?
161. Describe the life cycle of the bean in the spring framework?
162. How to inject the collection properties when dependency injection?
163. What are the limitations of automatic assembly in spring?
164. How do I get Spring's IOC container in a Web project?
165. What issues should be considered in the architecture of large Web sites?
166. What technologies do you use to optimize your website front end?
167. What are the Application Server optimization technologies that you have used?
168. What is XSS attack? What is a SQL injection attack? What is a csrf attack?
169. What is the domain model? What is the difference between the anemic model (anaemic domain model) and the congestion model (rich domain models)?
170. Talk about the benefits of test-driven development (TDD) and your understanding.

Java Engineer Interview FAQs

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.