getClass().getResourceAsStream 没见过。这是哪里的知识?
反射——Java高级开发必须懂的
imooc里边有这个课程
java 反射
Java jdk 搜索 Properties
Open for reading, a resource of the specified name from the search path used to load classes. This method locates the resource through the system class loader (see getSystemClassLoader()).
Parameters:
name - The resource name
Returns:
An input stream for reading the resource, or null if the resource could not be found
查阅JAVA文档