eclipseн¨JavaÀà×¢ÊÍÄ£°å
Àà×¢ÊÍ£¬¿ÉÒÔÖ±½ÓʹÓÃeclipseµÄcode style¹¦ÄÜ¡£
window-reference-java-code style-code templates-comments£¬Ñ¡ÖÐtype£¬È»ºóµã»÷¡¾edit¡¿°´Å¥£¬ÊäÈëÀà×¢ÊÍÐÅÏ¢£¬±£´æ¡£
ÒÔºóÒªÌí¼Ó°æȨʱ£¬°´Ctrl+alt+J£¬¾Í¿ÉÒÔÁË¡£
/**
* @ ${file_name}
* ×÷ÓÃ
* ×¢ÒâÊÂÏî
* ×¢Ò⣺ ±¾ÄÚÈݽöÏÞÓÚijijÈí¼þ¹«Ë¾ÄÚ²¿Ê¹Ó㬽ûֹת·¢
* VERSION DATE BY CHANGE/COMMENT
* 1.0 ${date} Name create
*/
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
package com.dongyang;
/*
* ¶Áxlsдxml
*/
import java.io.FileOutputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.output.XMLOutputter;
imp ......
Ç°Á½ÌìѧµÄÊÇjavaµÄ»ù´¡ÒÔ¼°ÔõôÅäÖÃJDK
public class Information{
public static void main(String args[]){
System.out.println("ÐÕÃû£º"+"asf");
System.out.println("ÐÔ±ð£º"+"m");
&n ......
Java¹æÔòÒýÇ湤×÷ÔÀí¼°ÆäÓ¦ÓÃ
¡¡¡¡Õª Òª Java¹æÔòÒýÇæÊÇÒ»ÖÖǶÈëÔÚJava³ÌÐòÖеÄ×é¼þ£¬ËüµÄÈÎÎñÊǰѵ±Ç°Ìá½»¸øÒýÇæµÄJavaÊý¾Ý¶ÔÏóÓë¼ÓÔØÔÚÒýÇæÖеÄÒµÎñ¹æÔò½øÐвâÊԺͱȶԣ¬¼¤»îÄÇЩ·ûºÏµ±Ç°Êý¾Ý״̬ϵÄÒµÎñ¹æÔò£¬¸ù¾ÝÒµÎñ¹æÔòÖÐÉùÃ÷µÄÖ´ÐÐÂß¼£¬´¥·¢Ó¦ÓóÌÐòÖжÔÓ¦µÄ²Ù×÷¡£
¡¡¡¡ÒýÑÔ
¡¡¡¡Ä¿Ç°£¬JavaÉçÇøÍƶ¯²¢·¢Õ¹Á ......
½ñÌìÏë¶ÁÈ¡srcϵÄÅäÖÃÎļþ£¬ÒÔǰһֱûÕÒµ½·½·¨£¬½ñÌìÑо¿ÁËÏÂÖÕÓÚOKÁË
System.out.println("path1:" + getClass().getResource("config.xml").getPath());
System.out.println("path2:" + getClass().getClassLoader().getResource("config.xml").getPath());
path1:/D:/DJ/workspace/.metadata ......