Class, why write thread?

Asked 2 years ago, Updated 2 years ago, 20 views

Hello. I went to a developer interview and the interviewer suddenly asked me. Why are you wearing it? I was speechless, so he asked me what the class was, so I combined behavior and data. That's all I could say. The interviewer said that if the basic principles are solid, we can handle this industry where new technologies continue to emerge. What do you mean? I didn't feel at all. What do you think is the best answer? Thank you.

java

2022-09-22 13:19

2 Answers

Isn't he asking why he started using object-oriented programming? When the function becomes complicated, it is necessary to organize it, but I think it is used because it is efficient to organize each concept in the class.

It would have been better if you talked about your development experience, which was well organized using class and inheritance. When I was making games, I had blocks in the game, and it was nice to create a basic block class and inherit them according to the characteristics of each block.

It's also convenient for monsters to create basic monster classes, and for each detailed monster, it's convenient to inherit and implement special functions.

Threads are often used when a process has to do something behind it, rather than wait for that task.

The interviewer may come out too hard, but I think the reason for using the class/thread is a concept that you naturally feel when you develop it a little bit. I think it's a question about whether you've developed it enough to feel the need. Fighting!


2022-09-22 13:19

Language is a tool, and Language supports it, so you can use it. I want to be eliminated. It's like one of the interviewers asking if you've read a book. I hope you study according to your will and keep trying.


2022-09-22 13:19

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.