学习知多少:java篇

分享兴趣,传播快乐,增长见闻,留下美好!

亲爱的您,这里是LearningYard学苑。今天小编为大家带来“学习知多少:java篇”,欢迎您的访问。

Share interests, spread happiness, increase knowledge, and leave a good legacy!

Dear you, this is The LearningYard Academy. Today Xiaobian brings you "Learn how much to know :Java chapter”, welcome your visit.

一、思维导图

一、 Mind mapping



二、基本语法(下)

二、 Basic Grammar (Part 2)

Java 变量

Java variables


Java 中主要有如下几种类型的变量:

There are mainly several types of variables in Java:

局部变量

类变量(静态变量)

成员变量(非静态变量)

local variable

Class variable (static variable)

Member variable (non static variable)


Java注释

Java annotations

类似于 C/C++、Java 也支持单行以及多行注释。

Similar to C/C++, Java also supports single line and multi line annotations.


Java 空行

Java Blank Line

空白行或者有注释的行,Java 编译器都会忽略掉。

Blank or annotated lines will be ignored by the Java compiler.


继承

inherit

在 Java 中,一个类可以由其他类派生。如果你要创建一个类,而且已经存在一个类具有你所需要的属性或方法,那么你可以将新创建的类继承该类。

In Java, a class can be derived from other classes. If you want to create a class and there is already a class with the properties or methods you need, you can inherit the newly created class from that class.


利用继承的方法,可以重用已存在类的方法和属性,而不用重写这些代码。被继承的类称为超类(super class),派生类称为子类(sub class)。

By utilizing inherited methods, methods and properties of existing classes can be reused without rewriting these codes. The inherited class is called a superclass, and the derived class is called a subclass.


接口

Interface

在 Java 中,接口可理解为对象间相互通信的协议。接口在继承中扮演着很重要的角色。

In Java, interfaces can be understood as protocols for communicating between objects. Interfaces play a crucial role in inheritance.


接口只定义派生要用到的方法,但是方法的具体实现完全取决于派生类。

The interface only defines the methods used for derivation, but the specific implementation of the methods depends entirely on the derived class.




今天的分享就到这里了。
如果您对今天的文章有独特的想法,
欢迎给我们留言,
让我们相约明天。
祝您今天过得开心快乐!

That's all for today's sharing.
If you have a unique idea for today’s article,
please leave us a message,
and let us meet tomorrow.
I wish you a happy day !


本文由learningyard新学苑原创,如有侵权,请联系我们!

翻译来源于谷歌翻译

部分来源于

百度文库

清华大学出版《java程序设计基础》

编辑&排版|百味

审核|闫庆红

展开阅读全文

页面更新:2024-03-19

标签:都会   清华大学   空行   注释   变量   静态   属性   接口   方法   快乐

1 2 3 4 5

上滑加载更多 ↓
推荐阅读:
友情链接:
更多:

本站资料均由网友自行发布提供,仅用于学习交流。如有版权问题,请与我联系,QQ:4156828  

© CopyRight 2020-2024 All Rights Reserved. Powered By 71396.com 闽ICP备11008920号-4
闽公网安备35020302034903号

Top