Linux Java开发人员可以在同一包中创建仅因大小写而不同的名称类吗? [英] Can Linux Java Developers create classes of names different only by case in the same package?

查看:156
本文介绍了Linux Java开发人员可以在同一包中创建仅因大小写而不同的名称类吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Java中,类名应该区分大小写,因此Java应该不会出现问题.问题应该出自于大小写敏感的文件系统,其中不包括许多Linux.

In Java class names are supposed to be case sensitive, so Java shouldn't have a problem with it. The problem should come from case-insenstive file systems, many linuxes not included.

推荐答案

我在Linux上进行了尝试,并且可以创建具有相同名称但大小写不同的不同类,并使用它们.因为我没有Windows机器,所以我无法测试它在Windows(或其他任何操作系统)中如何工作(或根本无法工作),但是我不鼓励这样的类命名.

I tried this on Linux, and I could create different classes with same name but different capitalization and use them. As I have no Windows-machine, I can't test how this would work (or if it works at all) in Windows (or any other OS for that matter), but I would not encourage naming classes like this.

这篇关于Linux Java开发人员可以在同一包中创建仅因大小写而不同的名称类吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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