Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What questions will be asked in the Java developer interview?

2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Today, the editor will share with you the relevant knowledge about what questions will be asked in the Java development interview. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

I. Foundation of Java

What's the difference between 1.JDK and JRE?

2. What is the difference between = = and equals?

3. If the hashCode () of two objects is the same, then equals () must also be true, right?

4. What is the role of final in java?

5. How much is the Math.round (- 1.5) in java?

6. Does String belong to the basic data type?

7. What are the classes of operation strings in java? What's the difference between them?

8. Is String str= "I" the same as String str=new String ("I")?

9. How do I reverse a string?

10. What are the common methods of the String class?

11. Does an abstract class have to have abstract methods?

twelve。 What is the difference between a normal class and an abstract class?

13. Can abstract classes be decorated with final?

14. What's the difference between an interface and an abstract class?

15. How many kinds of IO streams are there in java?

16. What's the difference between BIO, NIO and AIO?

17. What are the common methods of Files?

2. Containers

18. What are the java containers?

19. What's the difference between Collection and Collections?

20. What is the difference between List, Set, and Map?

21. What's the difference between HashMap and Hashtable?

twenty-two。 How do I decide to use HashMap or TreeMap?

23. Tell me about the implementation principle of HashMap?

24. Tell me about the implementation principle of HashSet?

25. What is the difference between ArrayList and LinkedList?

twenty-six。 How to implement the conversion between array and List?

twenty-seven。 What is the difference between ArrayList and Vector?

twenty-eight。 What is the difference between Array and ArrayList?

twenty-nine。 What is the difference between poll () and remove () in Queue?

thirty。 Which collection classes are thread safe?

thirty-one。 What is the iterator Iterator?

thirty-two。 How to use Iterator? What are the characteristics?

thirty-three。 What's the difference between Iterator and ListIterator?

thirty-four。 How to ensure that a collection cannot be modified?

III. Multithreading

thirty-five。 What's the difference between parallelism and concurrency?

thirty-six。 What is the difference between threads and processes?

thirty-seven。 What is a daemon thread?

thirty-eight。 What are the ways to create a thread?

thirty-nine。 What's the difference between runnable and callable?

forty。 What is the state of the thread?

forty-one。 What's the difference between sleep () and wait ()?

forty-two。 What's the difference between notify () and notifyAll ()?

forty-three。 What's the difference between run () and start () of a thread?

forty-four。 What are the ways to create a thread pool?

forty-five。 What are the states of the thread pool?

forty-six。 What is the difference between the submit () and execute () methods in the thread pool?

forty-seven。 How to ensure the safety of multithreading in java program?

forty-eight。 What is the upgrade principle of multithreaded locks?

forty-nine。 What is a deadlock?

fifty。 How to prevent deadlocks?

fifty-one。 What is ThreadLocal? What are the usage scenarios?

fifty-two。 Tell me about the underlying implementation principle of synchronized?

fifty-three。 What is the difference between synchronized and volatile?

fifty-four。 What's the difference between synchronized and Lock?

fifty-five。 What is the difference between synchronized and ReentrantLock?

fifty-six。 Can you tell me how atomic works?

IV. Reflection

fifty-seven。 What is a reflex?

fifty-eight。 What is java serialization? Under what circumstances do you need serialization?

fifty-nine。 What is a dynamic agent? What are the applications?

sixty。 How to implement dynamic proxy?

5. Object copy

sixty-one。 Why use cloning?

sixty-two。 How to achieve object cloning?

sixty-three。 What is the difference between a deep copy and a shallow copy?

VI. Java Web

sixty-four。 What's the difference between jsp and servlet?

sixty-five。 What are the built-in objects in jsp? What are the functions respectively?

sixty-six。 Tell me about the four scopes of jsp?

sixty-seven。 What's the difference between session and cookie?

sixty-eight。 Tell me how session works?

sixty-nine。 If the client forbids cookie, can session still be used?

seventy。 What is the difference between spring mvc and struts?

seventy-one。 How to avoid sql injection?

seventy-two。 What is a XSS attack and how to avoid it?

seventy-three。 What is a CSRF attack and how to avoid it?

7. Abnormality

seventy-four。 The difference between throw and throws?

seventy-five。 What's the difference between final, finally, and finalize?

seventy-six。 Which part of try-catch-finally can be omitted?

seventy-seven。 In try-catch-finally, if there is return in catch, will finally still execute it?

seventy-eight。 What are the common exception classes?

VIII. Network

seventy-nine。 What do the http response codes 301 and 302 represent? What's the difference?

eighty。 The difference between forward and redirect?

eighty-one。 Briefly describe the difference between tcp and udp?

eighty-two。 Why does tcp have to shake hands three times, not twice? Why?

eighty-three。 Tell me how the tcp sticky bag is produced?

eighty-four。 What are the seven-tier models of OSI?

eighty-five。 What are the differences between get and post requests?

eighty-six。 How to achieve cross-domain?

eighty-seven。 What is the principle of JSONP implementation?

IX. Design pattern

eighty-eight。 Tell me about the design patterns you are familiar with?

eighty-nine。 What's the difference between a simple factory and an abstract factory?

10. Spring/Spring MVC

ninety。 Why use spring?

ninety-one。 Explain what aop is?

ninety-two。 Explain what ioc is?

ninety-three。 What are the main modules of spring?

ninety-four。 What are the common injection methods for spring?

ninety-five。 Is bean in spring thread safe?

ninety-six。 How many bean scopes does spring support?

ninety-seven。 What are the ways for spring to automatically assemble bean?

ninety-eight。 What are the ways to implement spring transactions?

ninety-nine。 Tell me about spring's transaction isolation?

one hundred。 Tell me about the spring mvc running process?

one hundred and one。 What are the components of spring mvc?

one hundred and two。 What is the purpose of @ RequestMapping?

one hundred and three。 What is the purpose of @ Autowired?

11. Spring Boot/Spring Cloud

one hundred and four。 What is spring boot?

one hundred and five。 Why use spring boot?

one hundred and six。 What is the spring boot core profile?

one hundred and seven。 What are the types of spring boot configuration files? What's the difference between them?

one hundred and eight。 What are the ways that spring boot can be hot deployed?

one hundred and nine。 What's the difference between jpa and hibernate?

one hundred and ten。 What is spring cloud?

one hundred and eleven。 What is the function of spring cloud circuit breaker?

one hundred and twelve。 What are the core components of spring cloud?

12. Hibernate

one hundred and thirteen。 Why use hibernate?

one hundred and fourteen。 What is the ORM framework?

one hundred and fifteen。 How to view printed sql statements in the console in hibernate?

one hundred and sixteen。 How many query methods does hibernate have?

one hundred and seventeen。 Can the hibernate entity class be defined as final?

one hundred and eighteen。 What's the difference between using Integer and int for mapping in hibernate?

one hundred and nineteen。 How does hibernate work?

one hundred and twenty。 What is the difference between get () and load ()?

one hundred and twenty one。 Tell me about the caching mechanism of hibernate?

one hundred and twenty two。 What is the state of the hibernate object?

one hundred and twenty three。 What is the difference between getCurrentSession and openSession in hibernate?

one hundred and twenty four。 Does the hibernate entity class have to have a nonparametric constructor? Why?

XIII. Mybatis

one hundred and twenty five。 What is the difference between # {} and ${} in mybatis?

one hundred and twenty six。 How many paging methods does mybatis have?

one hundred and twenty seven。 Is RowBounds an one-time query for all the results? Why?

one hundred and twenty eight。 What is the difference between mybatis logical and physical paging?

one hundred and twenty nine。 Does mybatis support delayed loading? What is the principle of delayed loading?

one hundred and thirty。 Tell me about the primary cache and secondary cache of mybatis?

one hundred and thirty one。 What are the differences between mybatis and hibernate?

one hundred and thirty two。 What are the actuators (Executor) of mybatis?

one hundred and thirty three。 What is the implementation principle of the mybatis paging plug-in?

one hundred and thirty four。 How does mybatis write a custom plug-in?

14. RabbitMQ

one hundred and thirty five。 What are the usage scenarios of rabbitmq?

one hundred and thirty six。 What are the important roles of rabbitmq?

one hundred and thirty seven。 What are the important components of rabbitmq?

one hundred and thirty eight。 What is the role of vhost in rabbitmq?

one hundred and thirty nine。 How is the rabbitmq message sent?

one hundred and forty。 How does rabbitmq ensure the stability of messages?

How does 141.rabbitmq avoid message loss?

one hundred and forty two。 What are the conditions to ensure the success of message persistence?

one hundred and forty three。 What are the disadvantages of rabbitmq persistence?

one hundred and forty four。 How many types of broadcasts does rabbitmq have?

one hundred and forty five。 How does rabbitmq implement delayed message queuing?

one hundred and forty six。 What is the use of rabbitmq clusters?

one hundred and forty seven。 What are the types of rabbitmq nodes?

one hundred and forty eight。 What problems should be paid attention to when building a rabbitmq cluster?

one hundred and forty nine。 Rabbitmq is each node a full copy of the other nodes? Why?

one hundred and fifty。 What happens when the only disk node in the rabbitmq cluster crashes?

one hundred and fifty one。 Does rabbitmq have any requirements for the stop order of cluster nodes?

15. Kafka

one hundred and fifty two。 Can kafka be used separately from zookeeper? Why?

one hundred and fifty three。 How many data retention strategies does kafka have?

one hundred and fifty four。 Kafka sets both 7-day and 10-gigabyte cleanup data, and the message reaches 10 gigabytes on the fifth day. What will kafka do at this time?

one hundred and fifty five。 What causes kafka to run slowly?

one hundred and fifty six。 What should I pay attention to when using kafka clusters?

16. Zookeeper

one hundred and fifty seven。 What is zookeeper?

one hundred and fifty eight。 What are the functions of zookeeper?

one hundred and fifty nine。 How many deployment models does zookeeper have?

one hundred and sixty。 How does zookeeper ensure that the states of master and slave nodes are synchronized?

one hundred and sixty one。 Why should there be a master node in the cluster?

one hundred and sixty two。 There are three servers in the cluster, and one of the nodes is down. Can zookeeper still be used at this time?

one hundred and sixty three。 Tell me about the notification mechanism of zookeeper?

Seventeen. MySql

one hundred and sixty four。 What are the three paradigms of the database?

one hundred and sixty five。 There are a total of 7 pieces of data in a self-increasing table. Delete the last 2 pieces of data, restart the mysql database, and insert another piece of data. What is id at this time?

one hundred and sixty six。 How do I get the current database version?

one hundred and sixty seven。 Tell me what ACID is.

one hundred and sixty eight。 What is the difference between char and varchar?

one hundred and sixty nine。 What is the difference between float and double?

one hundred and seventy。 What is the difference between the inner connection, the left connection and the right connection of mysql?

one hundred and seventy one。 How is the mysql index implemented?

one hundred and seventy two。 How to verify that the index of mysql meets the requirements?

one hundred and seventy three。 Tell me about the transaction isolation of the database?

one hundred and seventy four。 Tell me something about the commonly used engines in mysql?

one hundred and seventy five。 Tell me about mysql's row lock and table lock?

one hundred and seventy six。 What about optimistic locks and pessimistic locks?

one hundred and seventy seven。 What are the means of troubleshooting mysql problems?

one hundred and seventy eight。 How to optimize the performance of mysql?

XVIII. Redis

one hundred and seventy nine。 What is redis? What are the usage scenarios?

one hundred and eighty。 What are the functions of redis?

one hundred and eighty one。 What's the difference between redis and memecache?

one hundred and eighty two。 Why is redis single-threaded?

one hundred and eighty three。 What is cache traversal? How to solve it?

one hundred and eighty four。 What are the data types supported by redis?

one hundred and eighty five。 What are the java clients supported by redis?

one hundred and eighty six。 What are the differences between jedis and redisson?

one hundred and eighty seven。 How to ensure the consistency of cache and database data?

one hundred and eighty eight。 How many ways are there to persist redis?

How does 189.redis implement distributed locks?

one hundred and ninety。 What are the drawbacks of redis distributed locks?

one hundred and ninety one。 How does redis optimize memory?

one hundred and ninety two。 What are the redis phase-out strategies?

one hundred and ninety three。 What are the common performance problems with redis? How to solve the problem?

19. JVM

one hundred and ninety four。 What are the main components of jvm? And its function?

one hundred and ninety five。 Tell me about the jvm runtime data area?

one hundred and ninety six。 Tell me the difference between stacks?

one hundred and ninety seven。 What are queues and stacks? What's the difference?

one hundred and ninety eight。 What is the parental delegation model?

one hundred and ninety nine。 Tell me about the execution process of class loading?

two hundred。 How to determine whether the object can be recycled?

two hundred and one。 What are the reference types in java?

two hundred and two。 What garbage collection algorithms does jvm have?

two hundred and three。 What kind of garbage collectors does jvm have?

two hundred and four。 Tell me more about the CMS garbage collector?

two hundred and five。 What are the new generation garbage collectors and old generation garbage collectors? What's the difference?

two hundred and six。 Briefly describe how does the generational garbage collector work?

two hundred and seven。 Tell me about the tools for jvm tuning?

two hundred and eight。 What are the commonly used parameters for jvm tuning?

These are all the contents of the article "what questions will be asked in the Java development interview?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report