There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH
That is incorrect too. Class names suppose to start with an upper case I think.Sankalp Bhagat wrote:At line number one, it should be. You have forgotten to write class keyword.
I think everyone should follow. And if you notice that someone is not following, it is something that needs to be told right away, especially to beginners, as later on could be very difficult to get rid off the bad habits. Simillarly as you need to direct child to the right direction when he needs that.Sankalp Bhagat wrote:If someone is following Java Naming Conventions, then the class name should always starts with capital letter.
I disagree. It is not fine at all, we found out that above. Probably is better not to think about this approach in all casesSankalp Bhagat wrote:But if you don't wanna follow naming conventions, still it's fine.
Liutauras Vilda wrote:
I think everyone should follow. And if you notice that someone is not following, it is something that needs to be told right away, especially to beginners, as later on could be very difficult to get rid off the bad habits. Simillarly as you need to direct child to the right direction when he needs that.Sankalp Bhagat wrote:If someone is following Java Naming Conventions, then the class name should always starts with capital letter.
I disagree. It is not fine at all, we found out that above. Probably is better not to think about this approach in all casesSankalp Bhagat wrote:But if you don't wanna follow naming conventions, still it's fine.
Welcome to the Ranch
Sankalp Bhagat wrote:
Liutauras Vilda wrote:
I think everyone should follow. And if you notice that someone is not following, it is something that needs to be told right away, especially to beginners, as later on could be very difficult to get rid off the bad habits. Simillarly as you need to direct child to the right direction when he needs that.Sankalp Bhagat wrote:If someone is following Java Naming Conventions, then the class name should always starts with capital letter.
I disagree. It is not fine at all, we found out that above. Probably is better not to think about this approach in all casesSankalp Bhagat wrote:But if you don't wanna follow naming conventions, still it's fine.
Welcome to the Ranch
You said it is incorrect. class name is supposed to be started with an upper case. So, to just let you know, I said it's fine if we don't write first letter capital. You can never say it's Incorrect. you shouldn't use such words "it is supposed to be". If the first letter was supposed to be written capital, then compiler would have thrown error.
Instead, you should have said "It is always a good programming practice to write the first letter of the class name as capital".
Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH
Sankalp Bhagat wrote:
Liutauras Vilda wrote:
I think everyone should follow. And if you notice that someone is not following, it is something that needs to be told right away, especially to beginners, as later on could be very difficult to get rid off the bad habits. Simillarly as you need to direct child to the right direction when he needs that.Sankalp Bhagat wrote:If someone is following Java Naming Conventions, then the class name should always starts with capital letter.
I disagree. It is not fine at all, we found out that above. Probably is better not to think about this approach in all casesSankalp Bhagat wrote:But if you don't wanna follow naming conventions, still it's fine.
Welcome to the Ranch
You said it is incorrect. class name is supposed to be started with an upper case. So, to just let you know, I said it's fine if we don't write first letter capital. You can never say it's Incorrect. you shouldn't use such words "it is supposed to be". If the first letter was supposed to be written capital, then compiler would have thrown error.
Instead, you should have said "It is always a good programming practice to write the first letter of the class name as capital".
Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH
Sankalp Bhagat wrote:If the first letter was supposed to be written capital, then compiler would have thrown error.
We don't know that yet, let's give OP to tell us thatSankalp Bhagat wrote:It's not a good programming practice but still that code will be compiled fine... As it was user defined class, I said it's fine it will still be compiled.
Agree, you are indeed right.Sankalp Bhagat wrote:It's not a good programming practice but still that code will be compiled fine.
Exactly, for OP (veeranjaneyulu kale) this going to be a useful to know as sometimes could give a headache identifying where the problem isSankalp Bhagat wrote:If and only if the class is public, then and then only the .java file name and the class name must be same
Do you pee on your compost? Does this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|