IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 开发工具 -> IntelliJ IDEA使用指南 -> 正文阅读

[开发工具]IntelliJ IDEA使用指南

作者:>

IntelliJ IDEA使用指南

1.代码模板

package com.test;

import java.util.ArrayList;
import java.util.Arrays;

/**
 * 模板的使用
 * IDEA代码模板所处的位置:
 * (1)settings - Editor - Live Template/Postfix Completion
 * 常用的模板的位置:Live Template:(iteration other output plain)
 * @author:XuBing
 * @data:2021/8/12——10:01 下午
 */
public class Templates {

    //module 6: transformation prsf
    private static final String a="aaa";
    //module 6:psf  psfi psfs
    public static final String b="bbb";
    public static final int c=1;
    public static final String d="ddd";
    

    //module 1:psvm main调出main方法
    public static void main(String[] args) {
        //module 2:sout
        System.out.println("hello");
        //模板2:变形 soutp/soutm/soutv/xxx.sout
        System.out.println("args = " + Arrays.deepToString(args));
        System.out.println("Templates.main");
        System.out.println("args = " + args);
        System.out.println(args);

        //module 3:fori
        String []arr=new String[]{"A","B","c"};
        for (int i = 0; i < arr.length ; i++) {

        }
        //transformation:iter
        for (String s : arr) {

        }
        //transformation:itar
        for (int i = 0; i < arr.length; i++) {
            String s = arr[i];
        }

        //module 4:list.for
        ArrayList<String> list = new ArrayList<>();
        for (String s : list) {

        }
        //module 4:transformation list.fori
        for (int i = 0; i < list.size(); i++) {
            
        }
        //module 4:transformation list.forr
        for (int i = list.size() - 1; i >= 0; i--) {
            System.out.println("倒叙遍历");
        }
        
    }

    public void method(){
        //module 5: ifn
        ArrayList<String> list = new ArrayList<>();
        if (list == null) {
            
        }
        //module 5:transformation: inn
        if (list != null) {
            
        }
        //module 5: transformation :xxx.nn xxx.null
        if (list != null) {
            
        }
        if (list == null) {
            
        }
    }


}

2.自定义代码模板

(1)自动生成无返回值方法

pvoid

public void $VAR1$() {
    $VAR2$
}

(2)自定生成返回值是Map的方法

pmap

public Map $VAR1$() {
    Map map = new HashMap();
    $VAR2$
    return map;
}

(3)自动生成private static final string

prsfs

private static final String $VAR1$ = $VAR2$;//$VAR3$
$END$

(4)自动生成private static final int

prsfi

private static final int $VAR1$ = $VAR2$;//$VAR3$
$END$
  开发工具 最新文章
Postman接口测试之Mock快速入门
ASCII码空格替换查表_最全ASCII码对照表0-2
如何使用 ssh 建立 socks 代理
Typora配合PicGo阿里云图床配置
SoapUI、Jmeter、Postman三种接口测试工具的
github用相对路径显示图片_GitHub 中 readm
Windows编译g2o及其g2o viewer
解决jupyter notebook无法连接/ jupyter连接
Git恢复到之前版本
VScode常用快捷键
上一篇文章      下一篇文章      查看所有文章
加:2021-08-16 11:57:00  更:2021-08-16 11:58:42 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年5日历 -2024/5/17 18:27:23-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码