如何在eclipse中注释多行代码?今天小编就为大家带来了在eclipse中注释多行代码的教程,有需要的小伙伴可以一起来看看喔。
方法一:使用Ctrl+/快捷键
第1步:在Eclipse中拖动鼠标,选中需要注释的代码,通常为连续多行代码。

第2步:按住Ctrl+/快捷键,如图所示。

第3步:会发现所选代码被“//”注释掉。当调试完后,可再次按住Ctrl+/快捷键打开注释。

方法二:使用Ctrl+Shift+C快捷键
第1步:在Eclipse中拖动鼠标,选中需要注释的代码。

第2步:按住Ctrl+Shift+C快捷键,如图所示。

第3步:会发现所选代码被“//”注释掉。当调试完后,可再次按住Ctrl+Shift+C快捷键打开注释。

方法三:使用Ctrl+Shift+/快捷键
第1步:在Eclipse中拖动鼠标,选中需要注释的代码。

第2步:按住Ctrl+Shift+/快捷键,如图所示。

第3步:会发现所选代码被“/* */”注释掉。

第4步:当调试完后,可按住Ctrl+Shift+\\快捷键打开注释,如图所示。

以上就是在eclipse中注释多行代码的教程了,大家都学会了吗?