Java 与 IntelliJ IDEA 知识点

1.入参和出参:

public String doIt(String a) {

     return "a+1"   ;
}

入参: a, 出参:String (也就是 "a+1")

2.Found dupicated code in xxx/xxx/xxx.java
这样的警告,没有关系。

3.Junit使用:

在CSDN下载jar包,然后放在lib文件夹下,
测试方法上面必须使用@Test注解进行修饰。
如果是红色,就按option+enter,然后create Junit.

右键方法名,debug它,就OK了。

4.快速生成setter 和 getter 方法

 Command + N

5.surround with / 区域性注释

Option + Command + T

6.实现接口的方法:

Control + O

然后去选择需要实现接口的哪些方法。

7.一般如果在JdbcUtil.java中写sql语句,是在Navcat或者其他的数据库管理工具上面,写好了复制过去。

8.try catch:

Option + Command + T

9.成员变量会有默认值:

public class AdminDao implements IAdminDao {

    private Connection con;  // 相当于 private Connection con = null;
    private int a;    // a 的默认值是0

10.拷贝IntelliJ IDEA提示的错误信息:

6497C125-38C7-49E3-BECF-9FAAF60B61B6.png

鼠标左键按住提示的信息,command + c-》 copy

  1. 更新pom.xml后,需要刷新下maven.

12.如果遇到这个问题

图片.png

在tomcat的配置文件中吧jre版本调高点,试一下。

13.LinkedList(链表)

http://blog.csdn.net/i_lovefish/article/details/8042883

  1. 在spring-cxf-service.xml中如果配置错误,就会报错,不要少写,‘address’

    <jaxws:endpoint id="devWs" implementor="com.cinsoft.smart3.android.ws.impl.DevWsImpl" address="/DevService"/>
    <jaxws:endpoint id="dataWs" implementor="com.cinsoft.smart3.android.ws.impl.DataWsImpl" address="/DataService"/>
    <jaxws:endpoint id="personWs" implementor="com.cinsoft.smart3.android.ws.impl.PersonWsImpl" address="/PersonService"/>
    

15.新写了接口,需要重启服务器。

16.null.toString() 会抛异常
17.json中如果要保存数据库,不能 ““”“”” 这样.最多只能有一个双引号。
"url": ""http://p1_url3.."",

18."data\510000RS\Other" 不能直接存储到数据库

19.java 中的System.out.println("信息");

是在Server-> output 中查看的。

20.苹果电脑查看more...(command + F1)

问题在这儿:
http://apple.stackexchange.com/questions/274976/command-f1-did-not-shows-the-more-in-intellij-idea?noredirect=1#comment345826_274976

我使用的:
Command + Fn + F1 .

出现后,释放F1,保留Command + Fn.

21.Intellij IDEA 查看最近打开的文件列表

Command + E

22.tomcat 配置注意事项:

图片.png

23.方法的移动

选中method:
option + 上/下键

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容