java
1--
shortcut and template
syso --> System.out.println();
e.g.
right click | Surround with | Try/catch block
他是怎么知道这个东西是怎么写的呢?
有模版
现在 我弄一个try finally 怎么弄?
window | perferences | java | editor | templates
new |
name : tryf
pattern:
try{
//put cursor here and click Insert Variable select "line_selection"
//next line will show automatically
${line_selection}
}finally{
//put cursor here and click Insert Variable select "cursor"
//next line will show automatically
${cursor}
}
----
go back to edit view
select a line
right click
surround with
tryf
OK!!!
还有在 eclipse 里
package explore 视图窗口里的filters ,可以设置显示不显示空的父包(默认不显示).
2--导入project
最好是这样,先 workspace
再把project copy to workspace
eclipse 比较笨, 拷进去了他自己不肯识别
我们要 import 一下
general |
existing projects into workspace
还是file system
就自己分辨吧.看项目大小,发布情况等等...
进来后有可能 JDK 不一样,那自己把原来的干掉,添加自己电脑上的JDK
就是在 java build path | libraties tab下
★[库就是N个JAR,仅此而已]★
3--import
其实这个import没有什么说法,说浪费资源什么什么的,
仅仅就是为了在写source code 的时候少写些前缀罢了.
不推荐* ,为了可读性嘛...
有个小技巧,你要 syso 一些东西,可以先选择,再 alt + / 呵呵,会出现的
这个在土测试里经常会用到,打印一些乱七八糟的东西.
推荐LOGGER,system.out.println真的很拿不上台面...
说了import,再说说JDK 1.5新特性,
import就是导入一些类,让你以后写这个类不要前缀了
1.5新有的 import static 这个是导入某个类的某个静态方法,
一.最最原始的: java.lang.Math.max(1,4);
二.有了import后,可以 Math.max(1,4); import java.lang.Math;
三,有了import static 直接 max(1,4); import static java.lang.Math.max;
当然,也可以一下子导入所有的静态方法,要记得变通,
换个*不就是全部了嘛!
分享到:
相关推荐
Algorithm-Machine-Learning-for-Beginner-by-Python3.zip,斯克莱恩、坦索流。,算法是为计算机程序高效、彻底地完成任务而创建的一组详细的准则。
springMVC beginner guider比较推荐的一部经典,名叫初学者指南,但其实很深入。
Cocos2d-X by Example Beginner's Guide-code
资源分类:Python库 所属语言:Python 资源全名:for-beginner-piano-0.3.1.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
Hacking-Secret-Ciphers-with-Python-A-beginner-s-guide-to-cryptography-and-computer-programming-with-Python.pdf
This book is for anyone who wants to learn computer programming and knows absolutely nothing about it. If you are wondering whether this book is going to teach you how to create amazing applets or ...
This book is for Java developers who are familiar with Eclipse as a Java IDE and are interested in learning how to develop plug-ins for Eclipse. No prior knowledge of Eclipse plug-in development or ...
introduce in english
Fully updated to cover Java Platform, Standard Edition 7 (Java SE 7), Java: A Beginner's Guide, Fifth Edition starts with the basics, such as how to compile and run a Java program, and then discusses...
Pentaho 3.2 Data Integration- Beginner's Guide code 源码
in-one programming reference * Covers the recent release of the Java 2 Platform Standard Edition 5.0 and the new J2SE Development Kit 5.0 * Starts with beginner topics including getting started ...
COCOS2d-X by Example Beginner-'s Guide
以pygame 游戏模块,来学习Python 基础,每章一个游戏。让python基础学得牢,学得有意思!
Java A Beginner's Guide(6th) 英文无水印pdf 第6版 pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系...
Java Programming 24-Hour Trainer, 2nd Edition is your complete beginner's guide to the Java programming language, with easy-to-follow lessons and supplemental exercises that help you get up and ...
学习使用Java和Selenium进行自动化测试 课程链接: : 您迈向出色的自动化测试仪的... Mockito- https: //courses.in28minutes.com/p/mockito-for-beginner-in-5-steps 安装工具 安装视频: https : //www.youtube.co
Eclipse Plug-in Development Beginner s Guide
DSP for Embedded and Real-Time Systems is the reference for both the beginner and experienced, covering most aspects of using today’s DSP techniques and technologies for designing and implementing an...
rails-beginner-s-guide是Rails 指导手册,帮组学习了解rails开发
Java初学者编程 书