After working as a programmer for 3 years, I decided to interview Ali Architecture to challenge a million annual salary!

Introduction to JAVA

As the most widely used and deployed language, Java is one of the three core technologies in the Web field. It was founded in 1991 by James Gosling, Patrick Naughton and Mike Sheridan. This high-level language has emerged in the IT industry with its first-class functions, providing developers with a bright future.

Why is JAVA so important?

In Java, the main advantage is that it enables developers to write code that runs anywhere (WORM); meaning that there is no need to recompile. Regardless of the system's architecture, Java compiled code can run on any JVM (Java Virtual Machine), making it one of the most widely used computer programming languages. It is class-based and object-oriented.

Insert picture description here

Here are the three main stages of the interview process:

My mind suddenly heated up: I feel that being a man requires dreams. There is no difference between dreams and salted fish!
Resolutely and resolutely went to vote for Ali's resume. I thought it would fall apart, but I did not expect to receive an interview invitation in 3 days! ~

  • Stage 1: Invitation
    When you apply for a job with an organization you wish to work with, the first step for the employer is to review. After reviewing your resume, if your performance (shown in your resume) is very suitable for the position, you will receive an interview invitation. Invitations can be sent in various forms, such as emails, phone calls, messages, or even letters. However, every form will remain professional, and candidates should do the same. Please be sure to respond to the invitation in time.

  • Stage 2: Meeting The
    next stage is the first round of face-to-face interviews. The main purpose of this is to estimate the candidates' abilities and understand their personalities. The employer must be punctual and professional to make a good first impression. Highlight your strengths, be very polite, and accept your weaknesses. Be confident and positive, but don't overdo it.

  • Stage 3: Follow-up The
    last (of course not) the least important stage is follow-up. Opportunities can be achieved or destroyed at this stage. Must adopt professional communication methods for follow-up work. You can send an e-mail to express your appreciation for the interview schedule, gratitude for the opportunity provided, or just call them to thank them and consult about work-related content.

Interview questions

1. The definition of classes in Java In Java, classes are templates for creating objects and defining data types. It serves as a building block for the Java language-oriented system.

2. What is the difference between static loading and dynamic loading?

Static class loading involves using new keywords to create objects and instances, while dynamic loading is performed in scenarios where the name of the class is not known at compile time.

3. What is multithreading? Multithreading is a programming concept used to run multiple tasks concurrently in a single program.

4. When and who developed Java?

Java was developed by James Gosling in Sun Microsystem in 1995.

5. What do JDK, JRE and JVM stand for?

  • JVM stands for Java Virtual Machine
  • JRE 代表 Java Runtime Environment
  • JDK stands for Java Development Kit

6. Are pointers used in Java?

No, Java does not use pointers. It has strict security. Instead of pointers, references are used in Java because they are safer and more secure than pointers.

7. How to use Java to connect to the database?

The steps to connect to the database using Java are as follows:

  • Register driver class
  • Create connection
  • Create a statement
  • Execute query
  • Close the connection
    8, what is the function of the JVM and JRE?

The JVM provides a runtime environment for the Java byte code to be executed. The JRE includes the set of files required by the JVM during runtime.

9. What is the difference between overloading and overwriting (rewriting)?

When there are two methods with the same name but different properties, it will be overloaded. Overwriting occurs when there are two methods with the same name and attributes, one in the child class and the other in the parent class. Check this post for a more in-depth analysis.

10. What is the default size of the hash load factor based on the set?

The default size is 0.75, and the default capacity is calculated as follows: Initial capacity*load factor

11. What is a bag?

A package is a collection of related classes and interfaces.

12. What is the base class of all exception classes?

Java.lang.Throwable is the superclass of all exception classes, and all exception classes are derived from this base class.

13. What is the difference between equals() and ==?

The equals() method is used to check the equality of two objects defined by business logic. The == or equal operator is used to compare primitives and objects.

14. Say the difference between two inner classes and subclasses. The inner class is in the same file, and the subclass can be in another file. With this in mind, although subclasses have methods of their parent class, inner classes get the methods they want.

15. How to define destructor in Java?

Since Java has its own garbage collection, there is no need to define a destructor. The garbage collection mechanism automatically performs the recycling of objects.

16. JSON definition JSON is an acronym for JavaScript Object Notation. It uses JavaScript syntax and the format is only text.

17. List the most important features of Java Java is a platform-independent language.

18. What is an anonymous class?

A class that has no name defined in a single line of code using the new keyword is called an anonymous class.

19. What is JVM?

JVM is a Java virtual machine, which is a runtime environment for compiled Java class files.

20. Can a dead thread be restarted?

No, a thread in a dead state cannot be started again.

21. Is the array a primitive data type?

No, in Java, arrays are objects.

22. What is a constructor in Java?

In Java, a constructor is a code block used to initialize an object.

23. What types of constructors are there?

There are two types of constructors:

  • Default constructor: The constructor without parameters is called the default constructor. If we do not define a constructor in the class, the compiler will create a default constructor (with no parameters) for the class, as shown below:
    Insert picture description here
  • Parameterized constructor 2. Parameterized constructor A constructor with known parameters is a parameterized constructor. If we want to initialize the fields of the class with our own values, then use the * parameter constructor.
    Insert picture description here

24. Explain the garbage collector in Java.

In Java, when an object is no longer used or referenced, garbage collection is called and the object is automatically destroyed.

25. What is the difference between stack and queue?

The difference between stack and queue is that the stack is based on the last in first out (LIFO) principle, while the queue is based on the FIFO (first in first out) principle.

Other interview techniques

  • Be on time, be on time and don’t be nervous
  • Ready to talk about your achievements-whether personally or professionally
  • Check your language and avoid using fillers
  • Browse the job description and find the key requirements you can talk about
  • Before answering, please listen carefully and take some time to collect your thoughts
  • Professional dress and behavior.
  • Avoid interrupting the interviewer
  • Bring all necessary documents
  • Conduct a brief study of the company and understand their needs
  • Thank the interviewer for his time and be polite to criticism

At last

In view of the fact that many people have been interviewing recently, I have also compiled a lot of interview topic materials here, as well as experience from other major companies. Hope it helps everyone.

Latest finishing interview questions
Insert picture description here

The answers to the above interview questions are organized into document notes.
I also sorted out some interview materials & the latest interview questions collected by some big companies in 2020 (all organized into documents, a small part of the screenshots), if necessary, you can click to enter the password: qf

Newly organized e-books

Insert picture description here

The latest compilation of interview documents

Insert picture description here
The above is the whole content of this article, I hope it will be helpful to everyone's study, and I hope you can support it. One-click three consecutive!

Guess you like

Origin blog.csdn.net/w1103576/article/details/109187771