Basic knowledge: 1. What is JDK?What is JRE? A) Answer: JDK: java development kit.JRE: The Java runtime environment. 2. What is platform independence in java? A) Answer: Java source files are compiled into bytecodes, which can be run in any system environment as long as there is a Java virtual machine.That is to say, write in one place and run everywhere.This is the cross-platform nature of java. 3. What is the role of path in configuring a Java environment on a computer?How to configure it? A) Answer: The role of path is to compile and execute Java programs using executable programs in Bin folder in JDK directory at any location in DOS environment. B) Find the path variable in the environment variable and add the absolute path of the bin folder. 4. What identifiers are legal? A) consisting of letters, numbers, and $, of unlimited length.The letters can be capitalized or lowercase letters with numbers of 0 to 9. B) The first character of the identifier cannot be a number. C) Identifiers are case-sensitive. D) The identifier cannot contain spaces. 5. How many basic data types are there in Java? A) byte, short, int, long, float, double, char, Boolean 6. What is implicit type conversion?What is Display Type Conversion? A) Java automatically uses implicit type conversion when assigning types with fewer occupancies to types with more occupancies. B) When assigning the value of a variable at a higher level to a variable at a lower level, the display type conversion operation must be used. 7. & & and & differentiate, | and | differentiate? A) and | are short-circuited and short-circuited or, when the expression on the left can judge the current result, not the expression on the right. B) and | then calculate the results after the expressions on both sides have been computed. 8. Break, continue difference? A) Break ends all cycles, continue ends the current cycle and enters the next cycle. 9. What are the naming rules for classes? (a) If the class name is in Latin letters, the initial letter of the name is in capital letters. B) Class names are best known by name. When class names are composed of several words, the first letter of each word is capitalized. 10. The content of class body consists of two parts, which two parts? A) Part is the definition of variables to describe attributes. (b) The other part is the definition of methods to describe functions. 11. Explain what are class member variables, local variables, instance member variables, class member variables? A) Variables defined in the variable definition section are called class member variables. B) The variables defined in the method body and the parameters of the method are called local variables. C) The member variables are divided into instance member variables and class member variables (static modification). 12. Briefly describe the use of this keyword. (a) This keyword is used in the instance method to represent the current object calling the method. 13. How to determine the return type of the method? A) The type of value returned by a method is the return type of the method. If there is no return value, the return type is void. 14. The return value is void. Is there a return? A) yes.But there is no value after return. 15. Explain what class methods are and what instance methods are. A) Static modification method is class method, and non-static modification method is instance method. 16. Describe the naming rules for methods and variables? (a) The first letter is lowercase, and if it consists of more than one word, the first letter is capitalized from the second word. 17. What is method overload? A) Method overload means that there may be multiple methods in a class with the same name, but the parameters of these methods must be different, that is, the number of parameters or the type of parameters. 18. What is the construction method? A) The construction method is a special method, whose name must be exactly the same as the name of the class in which it belongs, and it does not return any data type. 19. How to create an object? (a) Allocate memory for objects using new operators and class constructors. If there is no constructor in the class, the default constructor will be invoked. 20. Under system what provide circumstances constructive will methods the for classes, and what constructive methods will it provide? (a) If there is no constructor in the class, the system will

docxDoc JAVA Basic Interview Questions (Classic)

Professional Docs > Common > Other > Preview
45 Pages 0 Downloads 48 Views 3.0 Score
Tips: Current document can only be previewed at most page8,If the total number of pages in the document exceeds page 8,please download the document。
Uploaded by admin on 2019-10-16 00:27:47
Rate
You can enter 255 characters
What is my domain?( answer:www.45doc.com )
comments
  • No comments yet