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 - 初始化

扫描二维码关注公众号,回复: 6097735 查看本文章

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

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是什么?

猜你喜欢

转载自www.cnblogs.com/pengnew/p/10702677.html