Collection Java interview success

1, object-oriented features have what?

2, access modifiers public, private, protected, and when the difference is not write (default)?

3, String is the most basic data type?

4、float

f = 3.4; correct?

5、short s1 =

1; s1 = s1 + 1; wrong it short s1 = 1;? S1 + = 1; wrong?

6, Java has no goto?

7, int and Integer What is the difference?

8, &; and &&; the difference?

9, explanation memory stack (stack), the use of the heap (heap) and static area (static area) is.

10, Math.round (11.5) is equal to how much? Math.round (-11.5) equals how much?

11, switch whether acting on byte, whether acting on the long, whether acting on String?

12, calculated using the most efficient method 2 multiplied by 8?

13, the array has no length () method? String has no length () method?

14, in Java, how to jump out of the current multiple nested loops?

15, the constructor (constructor) can be rewritten if (override)?

16, two objects the same value (x.equals (y)

== true), but may have different hash code, this sentence right?

17, can inherit String class?

18, when an object is passed as a parameter to a method, this method can change the properties of this object, and returns the result of changes in, then in the end is passed by reference or value transfer here?

19, String and StringBuilder, StringBuffer the difference?

20, the difference between overloading (Overload) and rewritable (Override) is. Overloaded method can be differentiated according to the type of return?

21, describe the principle mechanism JVM class document loading?

22, char type variable can store a Chinese characters, and why?

23, abstract class (abstract

class) and interfaces (interface) What are the similarities and differences?

24, the static nested classes (Static

Nested Class) and different inner classes (Inner Class) of?

25, Java will be a memory leak it, please describe simple.

 

 

 

26, abstract (abstract) whether the method can simultaneously be static (static), it also is a local method (native), which can be synchronized whether modified?

27, explained the difference between static variables and instance variables.

28, if you can make calls to non-static (non-static) method from within a static (static) method?

29, how to achieve the target clone?

31、String s =

new String ( "xyz"); created several String Object?

32, the interface is inheritable (extends) the interface? Whether abstract class can implement (implements) interfaces? Abstract class is inheritable specific class (concrete class)?

33, a ".java" whether the source file can contain multiple classes (not internal)? What are the limits?

34、Anonymous

Inner Class (anonymous inner classes) can inherit other classes? Can I implement an interface?

35, the inner class can refer to its members containing class (outside of class) do? Are there any restrictions?

36, Java's final keyword in what usage?

38, the data type conversion between:

39, and how to reverse the replacement string?

40, how to GB2312 encoded string into ISO-8859-1 encoded string?

41, the date and time:

42, print the current time yesterday.

43, compare the Java and JavaSciprt.

44, when to use assertions (assert)?

45, Error and Exception What is the difference?

46, try {} there is a return statement, then the code immediately after this finally try {} Lane will not be executed, when executed, return before or after?

47, how the Java language exception handling, keyword: throws, throw, try, catch, finally, respectively, how to use?

48. What is the runtime exception with a test abnormalities similarities and differences?

49, list some of your common runtime exception?

50, explained the difference between final, finally, finalize the.

 

51, ExampleA inheritance class Exception, class inheritance ExampleB ExampleA. Ask what the output of this code is executed?

52, List, Set, Map whether inherited from the Collection interface?

53, set forth ArrayList, Vector, LinkedList storage performance and characteristics.

54, Collection and Collections of the difference?

55, List, Map, Set three interfaces while the access elements, what are the differences?

56, TreeMap and TreeSet how to compare elements in the sort? How Collections utility class in sort () method to compare elements?

57, Thread type of sleep () wait methods and objects () method can allow a thread suspended, What's the difference?

58, threads sleep () method and the yield () method What is the difference?

59, when a thread enters a synchronized method A object, other threads can access synchronized method B of this object?

60, please state synchronization with the thread and the thread scheduling related methods.

61, writing multithreaded programs There are several ways to achieve?

62, synchronized keyword usage?

63, an example synchronous and asynchronous.

64, start a thread is to call the run () or start () method?

65, what is the thread pool (thread

pool)?

66 relationship between the basic state of the thread and state?

67, outlining the similarities and differences between synchronized and java.util.concurrent.locks.Lock?

68, Java how to implement serialization, what is the point? 69, Java There are several types of flow?

70, write a method, enter a file name and a string, count the number of the string that appears in the file.

71, how to list all the files in a directory using Java code?

72, to achieve a multi-threaded socket programming with Java echo (echo) server.

73, XML document defines several forms? What is the essential difference between them? Parsing an XML document, which has several ways?

74, you used the XML in the project which places?

75, elaborate steps JDBC database operation.

76, Statement and PreparedStatement What is the difference? Which better performance?

77, when the operation of the database using JDBC, how to improve the performance of data read? How to improve the performance of update data?

78, during the programming database connection pool What is the role?

79, what is the DAO mode?

80, ACID affairs What does it mean?

81, JDBC how to carry out a transaction?

82, JDBC can handle Blob and Clob?

83, briefly regular expressions and their use.

84, Java is how to support the regular expression operations?

85, to obtain a class object class what way?

86, how to create objects through reflection?

87, how to get and set the value of the object of private fields through reflection?

88, how to call the object's method through reflection?

89, briefly object-oriented "six principles of a law."

90, briefly you understand the design patterns.

91, written in Java a singleton class.

92. What is the UML?

93, which is commonly used UML diagram there?

94, written in Java a bubble sort, quick sort.

95, a binary search written in Java.

 

Java interview questions Complete Works (in)

96 to explain the difference between Servlet and CGI?

97, which method Servlet interface there?

98, forward (forward) and redirect (redirect) the difference?

99, JSP which have built-in objects? What role are?

100, get and post requests difference?

101, commonly used Web server What?

102, JSP and Servlet What is the relationship?

103, explain the four JSP scopes.

104, or JSP Servlet how to achieve single-threaded mode?

105, session tracking technology to achieve what?

106, which has a filter function and usage?

107, which has the role and usage of listeners?

108, web.xml file What can be configured?

109, your project which used JSTL tags?

110, using the tag libraries What are the benefits? How to customize the JSP tag?

111, talk about the role of the object and its implicit Expression Language (EL) is.

112, Expression Language (EL) which operators support?

113, what Java Web development of Model 1 and Model 2 respectively refer to?

114, what Servlet 3 asynchronous processing refers to?

115, how to achieve file upload and download Java-based Web project?

116, the server receives the form data submitted by the user, in the end is to call the Servlet doGet () or doPost () method?

117, JSP contains static and dynamic includes any difference?

118, how to get the Servlet query parameter or form data submitted by the user?

119, Servlet initialization parameters and how to obtain the server context parameters configured by the user?

120, how to set the encoding of the request and response content types?

121, explain the patterns and characteristics of network applications.

122, what is the Web

Service (Web Services)?

123, to explain the concept: SOAP, WSDL, UDDI.

124, Java Web Service specification and related specifications What?

125, tell us about your Web Service framework to understand the Java field.

 

 

 Java interview questions Complete Works (lower)

126, what is ORM?

127, the persistence layer design issues to consider are what? Have you ever used a persistence framework What?

128, Hibernate SessionFactory is a thread-safe in it? Session is thread safe you (two threads to share the same Session it)?

129, what is the difference between load and get methods in Hibernate Session is?

130, Session's save (), update (), merge (), lock (), saveOrUpdate () and persist () methods respectively, what to do? What's the difference?

131, describes the process of loading the entity Session object.

132, what is the difference Query list method and iterate method interface?

133, Hibernate how to implement paging query?

134, locking mechanism what's the use? Brief Hibernate pessimistic locking and optimistic locking mechanism.

135, describes the three states and the entity object conversion relationship.

136, to understand how to delay loading mechanism of Hibernate? In practical applications, lazy loading and closing the Session contradiction is how to deal with?

137, for example associated with a many to many and many to many association map shows how to implement.

138, talk about your understanding of inheritance mapping. 139, briefly Hibernate common optimization strategy.

140, Hibernate talk level cache, L2 cache and query cache.

141, Hibernate in DetachedCriteria class is doing what?

142, @ OneToMany annotation attributes mappedBy What is the role?

143, MyBatis use <code> # </ code> and <code> $ </ code> write placeholder What is the difference?

144, explain the role MyBatis namespace (namespace) of.

145, MyBatis dynamic SQL What does it mean?

146, what is the IoC and DI? DI is how to achieve?

147, Spring Bean in the scope of what?

148, explain what AOP (Aspect Oriented Programming)?

149, how do you understand the "cross-cutting concerns," the concept?

150, how do you understand the connection point (Joinpoint) AOP in the cut point (Pointcut), enhanced (Advice), introducing (Introduction), weaving (Weaving), section (Aspect) these concepts?

 

 

 

 

 

151, Spring in the way of automatic assembly What?

152, Spring how to configure Bean using annotations? Which related notes have?

153, Spring's transaction management support What types? Which way you use in your project?

154, how to configure Spring IoC container in a Web project?

155, how to configure Spring MVC in a Web project?

156, Spring MVC works is like?

157, how in Spring

IoC container configuration data source?

158, How to Configure affairs enhancement?

159, select the reason for using the Spring framework (Spring framework for enterprise-class benefits of development to bring what)?

160, Spring IoC container configuration Bean's way?

161, describes the Spring Framework Bean's life cycle?

162, how to inject a collection of attributes dependency injection?

163, automatic assembly in Spring What are the limits?

164, how to get the Spring IoC container in a Web project?

165. large sites in architecture what issues should be considered?

166, you used the web frontend optimization technology What?

167, you have used the application server optimization techniques What?

168, What is XSS attack? What is SQL injection attack? What is CSRF attack?

169. What is a domain model (domain

model)? Anemia model (anaemic domain model) and congestive model (rich domain model) What is the difference?

170. talk about the benefits of test-driven development (TDD) and your understanding.

 

Other topics supplementary question:

    The difference between SSH framework and the framework of SSM

    Strusts framework related issues

    The difference Hashmap and hashtable

    J2EE explanation

Common J2EE design patterns? Description factory pattern.

Contact with the distinction of BS and CS.

The difference between the application server and WEB SERVER?

Application servers have those?

SQL

Server and Oracle, and MySQL What are the differences?

SQL statement to query the subject (supplement alone, focus)

Guess you like

Origin www.cnblogs.com/MonsterJ/p/12628922.html