如何在Eclipse中创建子类? [英] How to create a subclass in Eclipse?

查看:1160
本文介绍了如何在Eclipse中创建子类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在演讲期间,我的教授很快在Eclipse中创建了一个子类。

During lecture, my professor very quickly created a subclass in Eclipse.

结果将 extend关键字添加到子类中。我没有看到他点击了哪些按钮。

The result has the "extend" keyword added to the subclass. I didn't see what buttons he clicked.

有人知道我应该点击哪里吗? (我认为他右键单击了程序包浏览器中的当前课程,然后单击新建 ==> 课程,然后我就失去了选择的对象)。

Does anyone know where should I click? (I think he right clicked on the current class in the package explorer, then New ==> class, then I'm lost on what to select).

推荐答案

在查看要子类化的类时,请打开类型层次结构(按F4键)。右键单击要成为父类的类,然后在菜单中转到new-> class(或Ctrl-n,class)。

When you are viewing the class you want to subclass, open Type Hierarchy (press F4). Right click on the parent-to-be class, and in the menu go to new -> class ( or Ctrl-n , class ).

这篇关于如何在Eclipse中创建子类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆