C++ 中的 typedef 关键字是否有 Java 等效项或方法? [英] Is there a Java equivalent or methodology for the typedef keyword in C++?

查看:26
本文介绍了C++ 中的 typedef 关键字是否有 Java 等效项或方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自 C 和 C++ 背景,我发现明智地使用 typedef 非常有用.您是否知道在 Java 中实现类似功能的方法,无论是 Java 机制、模式还是您使用过的其他有效方式?

Coming from a C and C++ background, I found judicious use of typedef to be incredibly helpful. Do you know of a way to achieve similar functionality in Java, whether that be a Java mechanism, pattern, or some other effective way you have used?

推荐答案

Java 有原始类型、对象和数组,仅此而已.没有 typedef.

Java has primitive types, objects and arrays and that's it. No typedefs.

这篇关于C++ 中的 typedef 关键字是否有 Java 等效项或方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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