Results 1 to 11 of 11

Why is java case sensitive?

This is a discussion on Why is java case sensitive? within the Programming forums, part of the Web Designing & Development category; Java is platform independent language. It is widely used for developing code which contains different variables and hence java is ...

  1. #1
    Senior Member chinmay.sahoo's Avatar
    Join Date
    Dec 2013
    Location
    Banglore
    Posts
    266

    Thumbs up Why is java case sensitive?

    Java is platform independent language. It is widely used for developing code which contains different variables and hence java is case sensitive

  2. #2
    Junior Member
    Join Date
    Mar 2017
    Posts
    24

    Default Re: Why is java case sensitive?

    Java is a platform independent.It can be used in any machines irrespective of platform.so it is a case sensitive.

  3. #3
    Senior Member
    Join Date
    Nov 2016
    Posts
    152

    Default Re: Why is java case sensitive?

    Actually the case sensitivity gives more flexibility. With case sensitivity you can define the same variable but of different case in main and sub programmes for easy understanding.

  4. #4
    Member
    Join Date
    Jun 2017
    Location
    New York
    Posts
    72

    Default Re: Why is java case sensitive?

    Java is platform independent thus used on different platforms, for the security purpose the language is case sensitive.
    It is inherited from C language. In Java there are different variables, keywords and functions used.

  5. #5
    Senior Member
    Join Date
    Dec 2016
    Posts
    142

    Default Re: Why is java case sensitive?

    Yes, it is case-sensitive. It is this way because of its heritage from C. To keep the language more familiar to what people were used to "in the day", they left it as case-sensitive. There is an added advantage, since Java identifiers can be almost any Unicode character
    Better to ask the opposite question: why have case insensitivity? It turns out that case insensitivity is more complex than you might imagine -- in plain old english 7-bit ASCII-land it's easy to define and everyone agrees on what it means. However we live in a world of UTF-8/UNICODE and hundreds of languages many of which don't use latin characters. In that context 'case insensitivity' loses much of its meaning, and certainly becomes harder to define clearly. So, since case insensitivity is something of a pain to pin down, the natural tendency to make things simple and easy means you don't want to have it unless there's some very good reason to do so. No such very good reason exists today for programming language identifiers. In the distant past there was a good reason, which was that there were machines and operating systems that did not have lower case, and there was a concern that case sensitivity might lead to interoperability issues with those machines.

  6. #6
    Senior Member charlottegracie's Avatar
    Join Date
    Jan 2017
    Posts
    207

    Default Re: Why is java case sensitive?

    Yes, it is case-sensitive. It is this way because of its heritage from C. To keep the language more familiar to what people were used to "in the day", they left it as case-sensitive. There is an added advantage since Java identifiers can be almost any Unicode character.

  7. #7
    Senior Member
    Join Date
    May 2017
    Posts
    477

    Default Re: Why is java case sensitive?

    Case sensitivity is the norm in most programming languages and environments, because lower and upper case letters are represented differently at the lowest levels.

  8. #8
    Senior Member
    Join Date
    Nov 2016
    Posts
    152

    Default Re: Why is java case sensitive?

    Keep the good work going..Cheers

    Quote Originally Posted by charlottegracie View Post
    Yes, it is case-sensitive. It is this way because of its heritage from C. To keep the language more familiar to what people were used to "in the day", they left it as case-sensitive. There is an added advantage since Java identifiers can be almost any Unicode character.

  9. #9
    Member
    Join Date
    Jul 2017
    Posts
    63

    Default Re: Why is java case sensitive?

    A case-sensitive program that expects you to enter all commands in uppercase will not respond correctly if you enter one or more characters in lowercase. It will treat the command RUN differently from run. Programs that do not distinguish between uppercase and lowercase are said to be case-insensitive.

  10. #10
    Member
    Join Date
    Mar 2018
    Location
    Santa Clara, California, USA
    Posts
    40

    Default Re: Why is java case sensitive?

    Yes, Java is case sensitive. This might seem a little frustrating, especially when you realize why your program isn't running right. The variable you sent (TreeCount) is really named treeCount! There is a reason for this, and it's really at the level of bits and bytes. To a computer, t is not T. This can frustrate a human, but the computer doesn't care. They are completely different values in memory.

  11. #11
    OPH
    OPH is offline
    Senior Member
    Join Date
    Sep 2017
    Location
    DELHI, INDIA
    Posts
    391

    Default Re: Why is java case sensitive?

    One of the reasons for Java is case sensitive that is Security.