王MJ

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

     1最基本的单元是类:class

class 类名{

 

}

 

2程序的入口:public static void main(String [] args){

指令

输出语句指令System.out.println()

}

3结合类名其格式为class 类名{

public static void main(String [] args){

指令

输出语句指令

System.out.println(输入内容)

                 }

}

备注:其中(输入内容)中内容如果是字符串需要加双引号“”

 

 

4创建项目步骤:

打开IDE
点击左上角找到File
找到new
找到other
点击java project
点击Next
输入项目名(Enter a project name)后点击finish
13创建一个(类)文件(reate a new java class)
找到src点击右键
找到new
点击class
输入类名
finish

 

 

5编写java程序
main  alt+?回车
sysout alt+?

 

6运行程序
空白处点击右键
找到run as
点击java application

 

7重点单词
preferences  参数选择
general    常规
cancel  取消
directory   目录
clear screen 清屏
exit : 退出
make directory  创建目录
download 下载
System 系统
main 主要的

posted on 2019-08-14 16:48  王MJ  阅读(82)  评论(0编辑  收藏  举报