JAVA interview questions for Hang Seng Electronics

1. Please list some jQuery methods you know

1. Read and write the html content of the node

obj.html()/obj.html("<p>写节点</p>")

2. Read and write the text content of the node

obj.text()/obj.text("写文本")

3. Read and write the value attribute value of the node

obj.val()/obj.val("写属性值")

4. Read and write the attribute value of the node

obj.attr("属性名")/obj.val("属性名","属性值")

2. Please list some common Java exceptions

3. Please list some SQL keywords you know

CREATE

DROP

ALTER

TABLE

VIEW

INDEX

SEQUENCE

SELECT

AS

ORDER BY

GROUP BY

MODIFY


4. Please list some Linux commands you know

  1. Shut down the system to shut down immediately: $shutdown -h now
  2. Shut down the system after 10 minutes: $shutdown -h +10
  3. Restart: $ shutdown -r now
  4. Create a folder named temp in the current directory: $mkdir temp
  5. View the current path: pwd
  6. View all network interfaces and their status: $ifconfig -a
  7. Start an interface with up: $ifconfig eth0 up
  8. Use the down command to stop an interface: $ifconfig eth0 down
  9. List all files in a directory: ls -a

5. In javascript, use typeof to judge the type of a variable, and what possible return results

The typeof function queries the current data type, and the return value may include: String, Number, boolean, function, Object, undefined


6. In HTML, what are the valid values ​​for the type attribute of the input tag?

button

reset

submit

text

password

checkbox

radio

hidden

file


7. In 1, 2, 3, ..., 999, 1000, how many numbers are the product of each digit equal to 0

8. Please list some annotations in SpringMVC that you know

@Controller
@Responsebody
@Service
@conpo
@Autowired
@Qualifier
@Resource

9. Please draw the parent-child relationship diagram of ArrayList

10. The following is a declaration of a java method, please guess the purpose of this method, and implement the following method after confirming with the interviewer

public static <T> List<T> except(List<T> list,List<Integer> indexes)

11. Tell me how much do you know about Spring AOP?

12. Do you know the packaging command of maven?

13. Explain the life cycle of servlet

web 容器加载 servlet 并将其实例化后,servlet 生命周期开始,运行其 init() 方法进行 servlet 的初始化,请求到达时运行其 service 方法,service 方法自动派遣运行与请求对应的 doXXX 方法(doGet方法 doPost方法)等,当服务器决定将实例销毁的时候调用其 destroy 方法。

补充:servlet 与 CGI 的区别:
servlet 处于服务器进程中,它通过多线程的方式运行其 service 方法,一个实例可以服务于多个请求,并且其实例一般不会销毁,而 CGI 对每个请求都产生新的进程,服务完成后就销毁,所以效率上低于 servlet。

14. The difference between session and application


15. In which file is the thread pool configuration written?

Guess you like

Origin blog.csdn.net/m0_67393827/article/details/126741337