190413-Java快速学习

Java标识符 = 名字,用于变量,类,函数等
Java关键词, 可能包括了一些函数?

super的用法. 在father class和son class之间使用;
super可以提取varible, method, constructor

使用属性
super.maxSpeed

使用方法
super.message();

// invoke or call parent class constructor
super();

Java基本功
快速识别一个类的定义, 函数的定义, 变量的定义, 对象的定义.
Class的分析
先看Class的名字
再看Class的域-----[属性类型, 属性名称,赋值]
再看Class的Constructor, 看构造的输入
再看Class的Method/(函数), 看函数的输入, 一般是void, 不返回内容, 而constructor返回内容;

例子: https://docs.oracle.com/javase/tutorial/java/javaOO/classes.html

*关于override
@Override 是一种annotation,
在subclass中使用
When overriding a method, you might want to use the @Override annotation that instructs the compiler that you intend to override a method in the superclass. If, for some reason, the compiler detects that the method does not exist in one of the superclasses, then it will generate an error. For more information on @Override, see Annotations.

https://docs.oracle.com/javase/tutorial/java/IandI/override.html

JAVA最小技能包
变量
定义类
使用函数
定义对象
使用流程,循环,判断
使用数组

Create An object
declaration - variable name
instantiation - to create the object
initialization - 初始化

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

JAVA方法记录

几种最基本的操作
建立对象
建立类
建立函数
执行操作

  1. 建立变量
    使用一个变量必须声明; 有两种方法,
    第1是提前都声明好. 放在最前面.
    第2是像Python一样. 随时用, 在建立时声明
    第1
    Class object_name
    object_name=Class.Constructor(aug1, aug2....)
    第2
    Class object_name =Class.Constructor(aug1, aug2....)
    -------需要建立一种观点, File file=变量名字, 使用所有变量前必须把他们妈带上; 有时候需要, 有时候不需要?
    2.建立函数
    指定public还是private
    定义函数名称, 定义参数
    比如 public Function_Name(aug1, aug2, aug3...)

还有一些疑问的地方?Keyword是什么?

转载于:https://www.cnblogs.com/pengnew/p/10702677.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值