Eclipse巧妙使用Alt+/“快速输入System.out.println()与main函数

本文介绍如何在Eclipse中利用Alt+/进行快速代码补全,包括主函数、打印语句及异常声明等,有助于提升编码效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在Eclipse开发工具中,使用"Alt+/"可以根据已输入的字符,自动在库中筛选与之匹配的内容,比如:

 

想快速输出main主函数:

我只要输入 : ma+"Alt+/"  Eclipse会自动筛选库钟带有ma的内容

就可以弹出:

 

或者说System.out.println(""):

我只要输入:syso+"Alt+/"  (注意,System.out.println("");必须在方法内才能快速输入,不在方法内无法快速输入!)

就可以弹出:

 

此外,还可以扩展到其他任何JDK库中包含的内容,比如异常:

我只要输入:IllArEx+"Alt+/"

就可以弹出:

 

                学会使用"Alt+/"可以提升编码速度

JAR export finished with warnings. See details for additional information. Exported with compile warnings: KuCun2/src/main/java/com/kucun/DemoApplication.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/Config/CustomUserDetailsService.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/Config/Role/RoleConverter.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/Config/user/CustomUserDetails.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/Service/AppService.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/Service/DingdanService.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/Service/DynamicRepositoryService.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/controller/DingdanController.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/controller/UserController.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/controller/AppController.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/controller/ErrorConroller.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/data/entity/Mupi.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/data/entity/Chanpin_zujian.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/data/entity/Dingdan.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/data/entity/Dingdan_chanpin.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/data/entity/Kucun.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/data/entity/User.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/data/entity/Chanpin.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/data/entity/Caizhi.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/data/entity/Zujian.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/data/entity/Bancai.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/data/entity/DTO/EntityBasisSerializer.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/dataDo/DingdanRepository.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/dataDo/UserRepository.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/dataDo/CaizhiRepository.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/dataDo/DingdanChanpinRepository.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/dataDo/KucunRepository.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/dataDo/MupiRepository.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/dataDo/ZujianRepository.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/dataDo/DingdanChanpinZujianRepository.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/dataDo/ChanpinZujianRepository.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/dataDo/JinhuoRepository.java Exported with compile warnings: KuCun2/src/main/java/com/kucun/dataDo/BancaiRepository.java
最新发布
06-21
static { // 判断系统 // 加载动态库 // Windows操作系统 // todo windows 系统部署加载 .dll 文件 - 路径跟据自己存放位置更改【这里需要使用绝对路径】 System.load("E:\\opencv\\opencv\\build\\java\\x64\\opencv_java460.dll"); System.loadLibrary(Core.NATIVE_LIBRARY_NAME); // 加载OpenCV本地库 // 引入 特征分类器配置 文件:haarcascade_frontalface_alt.xml 文件路径 // 此文件在opencv的安装目录build\etc\haarcascades下可以找到 String property = "E:\\opencv\\opencv\\build\\etc\\haarcascades\\haarcascade_frontalface_alt.xml"; System.out.println(property); faceDetector.load(property); }Caused by: java.lang.UnsatisfiedLinkError: no opencv_java460 in java.library.path: C:\Program Files\Java\jdk-17\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;E:\lin\bin\;C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\MySQL\MySQL Server 8.2\bin;C:\Users\Lenovo\AppData\Local\Programs\Python\Python312;E:\java11\bin;C:\Program Files\Java\jdk-17\bin;E:\apache-jmeter-5.6.2\apache-jmeter-5.6.2\bin;E:\redis\;C:\Program Files\dotnet\;E:\nvm-set\nvm;E:\nvm-set\node.js;E:\maven\apache-maven-3.6.3\bin;D:\Tesseract-OCR;E:\phantomjs-2.1.1-windows\phantomjs-2.1.1-windows\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\rose\common;C:\Program Files\NVIDIA Corporation\NVIDIA app\NvDLISR;E:\apache-tomcat-8.5.97\apache-tomcat-8.5.97\bin;C:\Users\Lenovo\AppData\Local\Programs\Python\Launcher\;C:\Users\Lenovo\AppData\Local\Microsoft\WindowsApps;E:\Microsoft VS Code\bin;C:\Users\Lenovo\AppData\Local\Programs\Python\Python312;E:\java11\bin;E:\node\node_modules;C:\Users\Lenovo\AppData\Roaming\npm;E:\nvm-set\nvm;E:\nvm-set\nodejs;E:\maven\apache-maven-3.6.3\bin;E:\phantomjs-2.1.1-windows\phantomjs-2.1.1-windows\bin;;. at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429) at java.base/java.lang.R
03-28
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

狮子座的程序员

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值