What's the difference between throw and throws?
Throw is used to throw exception, in a method,
And throws is used to declare a possible exception, used in the declaration of a class or method.
How do I generate. jar files?
Usage: jar {ctxu}[vfm0m] [jar-file] [manifest-file] [-c directory] filename ...
Options:
-C Create a new archive
-t lists list of archived content
-X expand named (or all) files in the archive
-U Update Existing archive
-V build verbose output to standard output
-F Specify archive file name
-M contains marked information from the indicated file
-0 storage mode only; not in zip compression format
-M does not produce a manifest for all items (manifest) file
-I generates index information for the specified jar file
-C changes to the specified directory and contains the following files:
If a file name is a directory, it will be recursively processed.
The list (manifest) filename and archive file name) is specified in the same order as the ' m ' and ' F ' flags.
Example 1: Archive two class files into an archive file called ' Classes.jar ':
Jar CVF Classes.jar Foo.class bar.class
Example 2: Using an existing manifest (manifest) file ' Mymanifest ' will foo/the directory of all
Files are archived to an archive file called ' Classes.jar ':
Jar CVFM Classes.jar mymanifest-c foo/.
Example 3:JAR-CVF Zhz.jar Hello.class
Excellent article website recommendation:
1 How to become a Java master quickly [Tomjava original]
Http://www.java.com.cn/showtopic.as...719&Forum_ID=31
2. An old engineer's words (Ten tips for young electronics Engineers)
Http://www.pconline.com.cn/pcjob/it...312/261734.html
3. A large number of Java program examples, examples for almost all Java classes
http://javaalmanac.com/egs/
4. The Java Tutorial on Sun
http://java.sun.com/docs/books/tutorial/
5. Talk about Java Learning Direction (reprint)
Http://www.430000.net/printpage.asp?ArticleID=46
6. Java Learning Path
Http://www.111cn.net/develop/author/cxy/way_to_java.shtm
7. Java Program Coding specification from SUN
Code conventions for the JAVATM programming Language
Http://java.sun.com/docs/codeconv/h...onvTOC.doc.html
8. Java Program Coding specification from IBM
Http://www-900.ibm.com/developerWor...ard/index.shtml
9.50 Tips for Beginners in C + + good for Java too
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service