1.首先打开eclipse在空白处单击右键+New+Java project在Java name处输入新建项目名称(TRUE)。点击finish。
2.单击右键新建项目下src+New+package新建包,在name处输入新建包的名称iamdev,然后点击finish完成。
3.点击新建的包+new+class新建类在name处输入与项目名一样的名称TRUE,然后点击finish完成。
4.在编写程序的区域输入
(1)package iamdev;
(2)
(3)public class True {
(4) public static void main(String[ ] args) {下继续输入
(5) System . out . println("true,I am a dev,and can program") ;
(6) System . out. println("true,"
(7) + "I am a dev,"
(8) + "and can program" ) ;
(9) System. out. print("true,");
(10) System. out.print("I am a dev,");
(11) System. out .print("and can program");
(12) }
(13)}
5.最后单击右键+Run As在弹出的页面选择TRUE.java 再点击OK即可运行。可以在最下列的透视穿口看见输出的
true, I am a dev, and can program.
true, I am a dev, and can program.
true, I am a dev, and can program.