7.15 Count Number of Objects of Class in Java

preview_player
Показать описание
An object variable is a container that holds a reference to a specific instance of a class.
Class variable is variable which is shared among the objects. Class variable can be used by using static keyword for the variable.

Subscribe to the channel and learn Programming in easy way.

Рекомендации по теме
Комментарии
Автор

Sir, I am a CSE final year student. I am learning Java from your videos. I feel very much comfortable to learn from your lectures and practical demos. Thank you so much for the clear explanations and apt examples. I have a book titled 'How to crack Interviews in Java' written by Rashmi Kanta Das. It has only questions and one word answers without explanations. Can you please upload videos with explanations for the answers in that book?

vishnupriyaa
Автор

Thanks for the answer sir, I was asked this question in my technical interview and you explained it very well😘

b_dt_shubham_guptagupta
Автор

I became your fan and the way of your e explanation is awesome.keep it up

sudiptomukherjee
Автор

Excellent tutorial sir. this is what I had been searching for so many days. Perfect explanation and you explain so nicely that anyone who are really new to Java can also understand. This is a real compliment from my heart. Keep up the work. You are doing a great job helping out young engineers like us learn and get ourselves mastered with Java.

tocsashwin
Автор

One Mistake: Sir, You changed 'i' as static variable. So that can't be used in non static method sir. We have to put static in that class method sir.
Otherwise all your videos are really awesome sir. I completed your Python tutorial. Now I'm going with Java. After Java Script. Thank you so much for your videos sir.

sudharsansrini
Автор

i found it if we have parameterized constructor or method we have to declare i++ inside of that method also to get exact count

ravinsr
Автор

This type of questions is very important and help me to understand the concept
Please upload more videos like this thank you 🙏🙏

TechWek
Автор

dear sir, i have a doubt.. please clear
variable 'i', being a non-static variable can't be used inside the count() as well as main() (as you told in the previous lectures), so it is obvious that it will not be compiled at first place and show error if we not make it static

abhilashbisht
Автор

Hi Naveen Sir

I have a few questions for you so could you please answer them through your tutorials? I am certainly not judging your knowledge in this subject but Just requesting you.

1. Create a method which can take any kind of generic parameter.
For instance: map<key, value>, map, List<>.

2. Can we use comparable in the catch block ? if so, then what would be the scenario?

3. Can we use Object class in place of Throwable as it is a parent class?

4. What the are the fastest map used in order to store billions of data?

Regards

cyberguide_in
Автор

sir give static that will not replace the value of i u so much ur videos are in proper order sir

barath
Автор

thanks for all your efforts.... great teaching sir

shadabkhans
Автор

U r just an amazing person in this whole world!

kiruthikas
Автор

We want more interview questions, coding questions, and mcqs(wer we must find Java output)

sanisan
Автор

Heartly speaking a big thank you.
We want more interview questions sir

rahulpradhan
Автор

Thanks for sharing your knowledge, I find these videos fun and entertaining.

anotherSportsCarEnthusiast
Автор

Please create more important and complex interview questions

nithinj
Автор

this is so complex. simply create the anonymous block.
{
i++; // if you do variation i--// you will -as prefix
}
done.

aakashbhardwaj
Автор

Sir i have a question

how can we do operation with a static member in a non static method? As you have done with 'i' variable.

raounak_sharma
Автор

Thank you sir!! This was very well explained and helpful!

greenbeecannabissimplified
Автор

that's amazing thank you so much!!!

aviroxi