No. 10 11.28 interview questions

The first question: JDK There are three versions

J2SE, standard edition, Standard Edition, is a version we usually use
J2EE, enterpsise edition, Enterprise Edition, using this JDK develop J2EE applications
J2ME, micro edition, mainly used in mobile devices, java applications on embedded devices

The second question: the difference between JDK, JRE and the JVM

jdk jre for development and is used to run Java programs
jdk and jre contain the jvm, so that we can run java program
jvm is the core java programming language and platform independent.

Third question: JDK1.8 new features

1. Function Interface
function interfaces (functional interface also called functional interface), in simple terms, the function interface is an interface comprising a method only.
2.Lambda syntax
consists of three parts
1 a comma-separated brackets in the form of parameters, parameter is a parameter which functional interface method
2. A arrow: ->
The method thereof, and the code blocks can be an expression

Fourth Question: JDK common package

java.lang: This is the base class systems such as String, Math, Integer, System and Thread, providing common functions.
java.io: there is all inputs and outputs related classes, such as operating files and the like.
java.net: there is network-related classes.
java.util: This is the system auxiliary class.
java.SQL: This is the type of database operations

Fifth title: Object-oriented programming features four

Four object-oriented programming features: abstraction, encapsulation, inheritance, polymorphism

Question 6: four kinds of withdrawals polymorphic form

1. Interface inheritance and interfaces
inherited classes and 2.
3. Overload
4. rewritable

Difference method rewrite (Overriding) and method overloading (Overloading): The seventh title

Method overrides: If you define a subclass method and his father have the same name and parameters, we say that the method is overridden.
Method overloading: in the class can create multiple methods, they have the same name but with different parameters.

Q8: the difference between && and &

&& short-circuit function, i.e., if the first expression is false, the second expression no longer.
&: The first expression is false, but also to calculate the second expression. Also as a bit operator, and represents a bitwise operation.

Integer and Int difference: the ninth title

int is the basic data types, Integer is a reference data type.
java int type of raw data, Integer int is to provide a package java classes.
int variable instantiation is not required, Integer variables need to instantiate.
int default value 0, Integer Default is null.
int generally do numerical parameter, Integer conversion type generally do

Question 10: xml parsing several technical documents

The first technique: Dom4j technology
second technique: SAX technology
third technology: JAXB technology

Published 28 original articles · won praise 16 · views 593

Guess you like

Origin blog.csdn.net/qq_37881565/article/details/103301787