的Java可以在Java中使用

的Java可以在Java中使用

本文介绍了使用“扩展"的Java可以在Java中使用.具有范围分辨率/“点"的图像.操作员?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在阅读一些代码时碰到了这一点,我完全不知道这意味着什么.我尝试了谷歌搜索,但是什么也没找到,可能是由于词汇量不足.代码:

I just came across this while reading some code and I have absolutely no idea what it means. I tried googling and whatnot but I got nothing, probably due to a lack of vocabulary. The code:

public final class GeneralPath extends Path2D.Float
{
    // code and whathaveyou
}

到目前为止我所知道的:

What I know so far:

因此,我对公共最终类ClassName扩展"部分没有任何疑问,但是我不理解在超类名称中是否存在点/范围解析运算符.首先,我想有人会说"Java没有范围解析运算符"之类的东西,以澄清Java与Cpp/other-OOP语言之间细微差别,这很好,我很高兴知道那样细微的区别. "private"关键字曾经在一次硬件作业中杀死了我,但我希望有人注意到Java和C中的"private"之间的区别.

So I dont have any questions regarding the "public final class ClassName extends" portion, but I don't understand the presence of the dot/scope-resolution operator in the superclass designation. For starters, I imagine that someone is going to say something like "Java doesn't have a scope-resolution operator" to clarify some difference in nuances between Java and Cpp/other-OOP-languages, which is fine, as I appreciate knowing subtle distinctions like that. The "private" keyword killed me in a hw assignment once and I wish someone had noted the difference between "private" in Java and C then.

我很困惑,因为很明显它不是在引用超类的成员,因为成员"是大写的,即使是大写,引用对象的成员而不是对象类本身本身似乎也是多余的.此外,我没有找到有关该主题的信息,因为大多数编写Java入门指南的人都倾向于从诸如基本"类继承之类的简单概念开始,因此我找不到与点"运算符相关的任何内容.使用扩展"关键字.

Im confused because clearly it is not referencing a member of the superclass, as the "member" is capitalized, and even if it were, it would seem redundant to reference a member of an object rather than just the object class itself. Furthermore, I failed to find information on the subject since most people who write java how-to's tend to start with the simpler concepts like "basic" class inheritance, and so I couldn't find anything involving the "dot" operator in relation to using the "extends" keyword.

如果我使用了太多的技术术语,我想知道为什么他们将点运算符用于"Path2D.Float",或者至少在这种情况下点运算符会执行什么操作.

In case I am using too many technical terms, I want to know why they used the dot operator for "Path2D.Float", or at least, what the dot operator does in this context.

感谢一百万!

推荐答案

GeneralPath类扩展了嵌套在Path2D类内部的类Float,该类的定义如下:

The GeneralPath class is extending a class Float that is nested inside the Path2D class, which is defined something like this:

public class Path2D {
    public static class Float {
       // ...
    }
    // ...
}

这篇关于使用“扩展"的Java可以在Java中使用.具有范围分辨率/“点"的图像.操作员?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 07:20