jsp_属性文件的读取(Jsp_ property file read)
Jsp_ property file read. Txt, when you think you have nothing, you have at least t block, because the static type method or the code block belongs to the class itself
In an object, and this itself represents the current object, while the static method or block call does not initialize the object.
The problem is: if I don't want a class to have objects, then r 11 set the default constructor for this type to private, and certainly not to write anything else
Common construction method. And I'm a tool class, all static methods and variables. I want to get them in static blocks or static methods
Take the properties file, and this method won't work.
Then what shall I do? In fact, this class is not so use, he just need to get a Class object on it, and that's not easy
-taking all classes of parent class Object, using Object, class, isn't it convenient and safe for you to write the class yourself? Ha ha, down
Examples are given to facilitate communication.
Example one
Import . Properties:
Import java. io. InputStream;
Import java. io. lOException;
/ * * * read the example of the Properties file
* File: TestProperties. java
User: leizhimin
Date:, 2008-2-15, 18:38:40
/
Public, final, class, TestProperties (
Private static String paraml:
Private static String param2;
Static (
Properties prop = new, Properties ();
InputStr
jsp属性文件的读取Jsppropertyfileread 来自淘豆网www.taodocs.com转载请标明出处.