In this article we will discuss various types of face questions in a Java interview that will allow employers to test the candidate's Java and common object-oriented programming capabilities. The following chapters are divided into two, the first one will discuss object-oriented programming and its features, about Java
Analysis of the Java2 Programmer examination (SCJP) -- Linux general technology-Linux programming and kernel information. The following is a detailed description. Preface
Whether you are a newbie or an expert in programming, you will be amazed by the Infinite Charm of Sun's Java. Java brings you more than just the advantages of object-oriented, open, platform-independent, easy-to-use, secure, and "Write on
ObjectiveAbout winning in the interview of the Java series of basic collection and finishing, all the topics are carefully selected, very basic and test candidates for the basic skills, should say that the chances of being interviewed is very large. Here sorting out for everyone to take a look before the interview, all the topics collated from the network, there are some errors and clerical error, thanks to the reader's enthusiastic correction, in the
ObjectiveAbout winning in the interview of the Java series of basic collection and finishing, all the topics are carefully selected, very basic and test candidates for the basic skills, should say that the chances of being interviewed is very large. Here sorting out for everyone to take a look before the interview, all the topics collated from the network, there are some errors and clerical error, thanks to the reader's enthusiastic correction, in the
is the object, stack memory storage object reference, the string "ABC" is stored in the heap memory, and S1,S2 as the object reference is stored in the stack memory.
Public Final class String
Implements Javaio. serializable, comparablestring >, charsequence
{
Private Final char value[];
Private final int offset;
Private Final int count;
private int hash; columns such as: string string = "ABCDEFG"; String.charat (2) = ' l '; this
More Java interview written paper series:Java interview written test stationHow does the 1.Java hashmap work?HashMap is a key value for the data structure, each key will have a corresponding value, the key is to identify such a value.HashMap based on the hashing principle, we store and retrieve objects through the put () and get () methods. When we pass a key-value pair to the put () method, it calls the Ha
by invoking the service () method separately for each request, and finally calls the servlet (translator Note: This should be the servlet instead of the server) destroy () method to remove the servlet.
What are the advantages of object-oriented software development?Reference answerCode development is modular and easier to maintain and modify.Code reuse.Enhance the reliability and flexibility of your code.Increase the understandable nature of the code.Object-oriented programming has many impor
separately, which belongs to the salvage function operation.Interview question: Please explain the difference between ArrayList and Vector.· These two classes are subclasses of the List interface;· The Vector class is provided at JDK 1.0, and the method of operation provided is synchronous, so it is thread-safeThe Operation class;· The ArrayList class is provided at JDK 1.2, and the method provided is asynchronous, so it belongs to the non-linearProcess-safe Operation classes.If later in develo
Java basics:
1. the scope is public, private, and protected.
A: The differences are as follows:
Scope: current class, same package, Child class, other package
Public √
Protected √ ×
Friendly √ ××
Private √ ×××
The default value is friendly when no data is written.
2. Can anonymous inner class (anonymous internal class) be extends (inherited) other classes or implements (implemented) interface (Interface)
A: anonymous internal classes are internal clas
In a typical Java interview, the interviewer asks the basic concepts of the thread, such as: why you need to use threads, how to create threads, and how to create threads better (for example, inheriting the thread class or calling the Runnable interface), And then gradually asked what concurrency problems were like in Java concurrency programming, Java memory mod
. The Array does not provide as many functions as ArrayList, such as AddAll, RemoveAll, and iterator. Although ArrayList is obviously a better choice, there are times when arrays are useful, such as the following three scenarios.(1) If the size of the list has been specified, most of the cases are stored and traversed.(2) for traversing the base data type, although collections uses auto-boxing to alleviate the encoding task, working on a list of basic types of a specified size can also become sl
The basic course of Java language programming
Practice Study Questions Reference answers
1th Chapter Java Programming Overview 1.9 Practice Study Questions
1, the Java running platform includes three versions, please select the correct three: ()
A.
adds 1/2 to its floor.27, String s = new string ("XYZ"), and several string Object created?Two28, Design 4 threads, of which two threads add 1 to J each time, and two threads to J for each reduction of 1 per second. Write the program.The following program implements threads using an internal class, and does not consider order issues when adding or subtracting J.public class threadtest1{private int J;public static void Main (String args[]) {ThreadTest1 tt=new ThreadTest1 ();Inc Inc=tt.new Inc ()
(garbage collector), but the memory in the heap is not released immediatelyE. Local variables: By declaring in a method, or a piece of code (such as a For loop), execution to it in the stack to open up memory, when the local variable one but out of scope, memory immediately releasedThe implementation principle of Java polymorphismA. In abstract terms, polymorphism means that the same message can be used in a variety of different ways depending on the
The first one discusses object-oriented programming and its features, common questions about Java and its functionality, Java collection classes, garbage collectors, this chapter focuses on exception handling, Java applets, SWING,JDBC, remote method Invocation (RMI), servlet, and JSP.
Exception handling
.char variable?Save Unicode to save Chinese characters20. Start a thread with run () or start ()?Start ();Run () put the executed code insideThird, intermediate simple answerWhat is the difference between 21.sleep () and wait ()?Sleep to the time to wake upWaiting to wake up22.JDBC How do transactions work?Set JDBC Auto-commit false to open transactions after multiple transactions commit exception rollback rollbackHow do I access the database in 23.Java
wrapper type , which means that the wrapper type can be converted directly to the base data type , as shown in the following code:int m=100; Integer im=int N=im; The appeal code directly assigns m to the wrapper object IM, which is automatically boxed and then directly assigns the IM to the basic data type N, which is the automatic unpacking. Although the code on the surface is simple and convenient, however, in essence, the container still uses new to create the object, while unpacking is s
and best practices," studied not less than five times.Anyway, although the Java Virtual machine did not ask, but I think it is necessary to study, simply make an outline, talk about the more important Java Virtual machine content:(1) Memory layout of Java Virtual machine(2) GC algorithm and several garbage collectors(3) class loading mechanism, that is, parental
Links: http://ifeve.com/java-multi-threading-concurrency-interview-questions-with-answers/Original: Http://www.journaldev.com/1162/java-multi-threading-concurrency-interview-questions-with-answersMultithreading and concurrency issues are among the questions that interviewers
client. The expression is defined between the two tags, 9. What does the implied object mean? What are the hidden objects?JSP implied objects are some Java objects in the page, and the JSP container allows these Java objects to be used by developers. Developers can use them directly without a clear statement. JSP implicit objects are also called predefined variables. The following lists the implied objects
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.