Intellij idea 快捷键2--生成常用代码
2017-05-24 19:28
656 查看
使用Intellij idea 开发的时候,使用快捷键快捷生成我们想写的代码。
接下来记录几个常用的:
psvm 生成main 方法
psf 生成公共静态final
psfi 生成公共静态 final int
psfs 生成公共静态final String
sout 生成控制台输出
这么多怎么记?
老司机叫你-->记首字母!
在使用Intellij idea 开发过程中,一些快捷生成代码块的操作简直是不能再爽more 了, 而且会让你感觉使用起来非常自然,非常舒服。
一个点引出,再加上常用的自动补全 ctrl +shift + enter , 开发效率奇快.
1.对于String 类型
2.对于boolean类型
可以看到一个"." 就能引出相关的快捷方法,不细表.
3.对于数值类型
增加for循环快捷.如图:
总:intellij idea 的快捷生成代码使整个编码过程非常的流畅,没有断裂感, 一个点 引出一串思路呀~~
接下来记录几个常用的:
psvm 生成main 方法
public static void main(String[] args) { }
psf 生成公共静态final
public static final
psfi 生成公共静态 final int
public static finalint
psfs 生成公共静态final String
public static finalString
sout 生成控制台输出
System.out.println();
这么多怎么记?
老司机叫你-->记首字母!
在使用Intellij idea 开发过程中,一些快捷生成代码块的操作简直是不能再爽more 了, 而且会让你感觉使用起来非常自然,非常舒服。
一个点引出,再加上常用的自动补全 ctrl +shift + enter , 开发效率奇快.
1.对于String 类型
"test".sout //输出
System.out.println("test");
"test".cast //转换
((光标位置) "test")
"test".field //
"test".format //字符串格式化
String.format("test", 光标位置)
"test".inst || "test".instanceof
"test" instanceof ? ((光标位置) "test") : null;
"test".nn
"test".notnull
if ("test" != null) { }
"test".null
f ("test" == null) { }
"test".par
("test")
"test".return
return "test";
"test".synchronized
synchronized ("test") { }
"test".try
try { "test" } catch (Exception e) { e.printStackTrace(); }
"test".var
2.对于boolean类型
可以看到一个"." 就能引出相关的快捷方法,不细表.
3.对于数值类型
增加for循环快捷.如图:
总:intellij idea 的快捷生成代码使整个编码过程非常的流畅,没有断裂感, 一个点 引出一串思路呀~~
相关文章推荐
- Intellij idea 快捷键(3)--生成常用代码
- Intellij idea 快捷键(2)--生成常用代码
- IntelliJ IDEA常用的快捷键(代码提示/注释代码/加入类注释和方法注释Javadoc)
- Intellij IDEA快捷生成常用代码
- Eclipse中的快捷键快速生成常用代码(例如无参、带参构造,set、get方法),以及Java中重要的内存分析(栈、堆、方法区、常量池)
- Eclipse中的快捷键快速生成常用代码(例如无参、带参构造,set、get方法),以及Java中重要的内存分析(栈、堆、方法区、常量池)
- Intellij IDEA 14中使用MyBatis-generator 自动生成MyBatis代码
- IntelliJ Idea 常用快捷键 及 快速编写代码
- firefox上快捷键扩展keyconfig的常用代码
- Intellij IDEA 为常用代码添加快捷代码,补全代码
- VS代码生成工具ReSharper的快捷键的配置
- Intellij IDEA 14中使用MyBatis-generator 自动生成MyBatis代码
- Xcode 统计项目代码行数及常用快捷键
- Intellij IDEA 14中使用MyBatis-generator 自动生成MyBatis代码
- CSS3 Generator提供了13个CSS3较为常用的属性代码生成工具,而且可以通过这款工具除了在线生成效果代码之外,还可以实时看到你修改的效果,以及浏览器的兼容性。
- IntelliJ Idea 常用快捷键列 4000 表
- Sublime Text 3如何快速生成HTML5的头部信息和常用的快捷键
- IntelliJ IDEA使用快捷键生成各种for循环。增强for循环等等
- 【常用快捷键】intellij idea 中类似Eclipse自动补全变量名称和属性名称的快捷键
- Intellij idea用快捷键自动生成序列化id