+ 1

Can anyone explain me where we have to use Upper case and where we have to use lower case in Java?

I am a beginner to Java and I noticed that when I change the case of the first letter then the function of the object changes. Can anyone please explain me why this happens and where I have to use Upper cases and where I have to use lower cases. I would be very grateful if someone could help me. Thank You.

19th Jun 2020, 6:33 PM
spidy
3 Answers
+ 1
spidy OK, I think Java is advising you to use lowercase in variable names, because first letter uppercase is reserved to class names.
19th Jun 2020, 7:39 PM
Felipe BF
+ 1
Where are you seeing differences in case? When using objects of different types, maybe? I ask because Java is case-sensitive, as most modern programming languages.
19th Jun 2020, 7:15 PM
Felipe BF
+ 1
I used a string in the following way:- String Food; Food =?; So here "Food" was not accepted as a string because it was in upper case. Can you please explain why? And thank you for replying.
19th Jun 2020, 7:32 PM
spidy