Why a class can't be private & protected ? || Core Java FAQs Videos

  Рет қаралды 46,893

Naresh i Technologies

Naresh i Technologies

Күн бұрын

Пікірлер: 41
@NareshIT
@NareshIT 5 жыл бұрын
Please Comment, Subscribe and Click Bell🔔🔔🔔 Icon for More Updates. To learn software course from our experts please register here for online training: goo.gl/HIB0wL
@richcohen5936
@richcohen5936 7 жыл бұрын
A class can be private. Why? Because we can take as many inner classes and they can have private modifier. An outer class can’t be private or protected..
@empty3161
@empty3161 4 жыл бұрын
sir i am from uttarakhand. you are explaning very good.
@mohamedrawoof5093
@mohamedrawoof5093 4 жыл бұрын
A class can be a private and it’s an just access modifier. The private class for Singleton object is make sense but not for other normal classes. Mentioning private modifier for Singleton object is to protect the class not to instanciate.
@shashanknaag4910
@shashanknaag4910 5 жыл бұрын
Very Informational
@user-tz7xc4fe3u
@user-tz7xc4fe3u 6 жыл бұрын
nice explanation pleace continue thanks sir
@samarthgupta2985
@samarthgupta2985 2 жыл бұрын
Thank u
@krishnashauzshenikala9240
@krishnashauzshenikala9240 5 жыл бұрын
Very easy explanation sir
@probot143
@probot143 2 жыл бұрын
What is not inherited from parent class ?
@shivamkamdi6822
@shivamkamdi6822 3 жыл бұрын
Thank you sir .!!!
@somnathghosh1211
@somnathghosh1211 7 жыл бұрын
finally i understood...thanks sir
@MrPraveenBasavaraj
@MrPraveenBasavaraj 7 жыл бұрын
A class can be private in case of inner classes.
@divyeshkumarbalar7732
@divyeshkumarbalar7732 6 жыл бұрын
yes, it can be inner class
@miteshjain56
@miteshjain56 6 жыл бұрын
god bless u sir
@vv7205
@vv7205 4 жыл бұрын
sir i am Prepareing Eect so Object type Question kavali
@vasudevkodali8566
@vasudevkodali8566 5 жыл бұрын
1.If default is allowed, why protected is not allowed.. In fact, protected is more visible than defalut 2.Ok.. Grand parent can't be protected, but why children can't be protected..?
@afshakhan4589
@afshakhan4589 6 жыл бұрын
loved that way u said "paper" 😂😊
@armanchaudhari4767
@armanchaudhari4767 5 жыл бұрын
😂😂😂
@shankar1373
@shankar1373 4 жыл бұрын
😂😂😂
@pavanbirajdar2329
@pavanbirajdar2329 7 жыл бұрын
very nice explanation
@nagarajuuppalapati1421
@nagarajuuppalapati1421 7 жыл бұрын
Good Explanation...
@vinodkale7045
@vinodkale7045 7 жыл бұрын
Very nice expliantion
@dnyaneshwarsartape2745
@dnyaneshwarsartape2745 5 жыл бұрын
It is all about outer class.
@AKHILDS-j3v
@AKHILDS-j3v 6 жыл бұрын
thanks sir..........................tsmuch...
@ShivKumar-yv9ti
@ShivKumar-yv9ti 6 жыл бұрын
default also not visible out side the world but we can make default class
@Dawnsunflower156
@Dawnsunflower156 4 жыл бұрын
beta kuch cheezon ko bs package level tk rkhne k liye hi default ka prayog kiya jata hai...private,protected agr kr b denge to ghum fir k woi hoga class bahr nhi ja paegi,,to jb default ye functionality de rha h to ambiguous ku bnana system ko,,isiliye ise allow hi nhi kiya gaya
@hhcdghjjgsdrt235
@hhcdghjjgsdrt235 Жыл бұрын
@@Dawnsunflower156 beta ?
@Dawnsunflower156
@Dawnsunflower156 Жыл бұрын
@@hhcdghjjgsdrt235 I am a teacher😅😅
@hhcdghjjgsdrt235
@hhcdghjjgsdrt235 Жыл бұрын
@@Dawnsunflower156 sorry mam
@ubaidansari3409
@ubaidansari3409 5 жыл бұрын
thanks
@shaheenshaikh6701
@shaheenshaikh6701 6 жыл бұрын
protected means in same package and derived clsses can access so how can we say that in same package it will be a parent child relation only?
@gauravgupta9477
@gauravgupta9477 4 жыл бұрын
Correct Correct....It can be accessed from a non-child class as well inside the same package. I was searching if someone else has raised this doubt or not.
@srirammandadapu6793
@srirammandadapu6793 6 жыл бұрын
but by default class is private in oops for ensuring the concept of data hiding
@harikrishnahkb
@harikrishnahkb 6 жыл бұрын
It is wrong In Java default is not private, In Java default is "package level access"
@vanipattar3931
@vanipattar3931 4 жыл бұрын
Sir only you are giving examples to understand but technically not explained.
@namankapoor1
@namankapoor1 6 жыл бұрын
Your explanation for protected is wrong.
@srikanthpeddina192
@srikanthpeddina192 6 жыл бұрын
y?, whats wrong tl?
@keleleberhie6525
@keleleberhie6525 5 жыл бұрын
@@srikanthpeddina192 protected members can be also accessed by any classes within the same package!!
@gauravgupta9477
@gauravgupta9477 4 жыл бұрын
@@keleleberhie6525 Correct Correct....but still i didn't understand why can't we make class protected.
@keleleberhie6525
@keleleberhie6525 4 жыл бұрын
@@gauravgupta9477 Why do you need to defined a class as protected? I can't see the need for that. In my understanding, I can classify oops access modifiers into two categories 1) package level(public, default) 2) class level(private, default, protected, public) But let me give you a way to answer it by asking you. #If you need your class to be protected what would be the usage public access modifier?!
@deepthipapa914
@deepthipapa914 7 жыл бұрын
what is he talking... is he teaching english or java?
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
Why static block executes before main () || Core Java FAQs Videos
7:05
Naresh i Technologies
Рет қаралды 49 М.
What is the difference between JDK,JRE and JVM
6:28
Durga Software Solutions
Рет қаралды 514 М.
Checked vs Unchecked Exception || Core Java FAQs Videos | Naresh IT
11:02
Naresh i Technologies
Рет қаралды 61 М.
Access Modifier in Java-Public,Protected,Private and Default
10:10
Java Tutorials || Java OOPS  ||   Member Modifiers protected || by Durga Sir
17:50
Durga Software Solutions
Рет қаралды 45 М.
Why main() is public and static || Core Java FAQs Videos  | Naresh IT
7:10
Naresh i Technologies
Рет қаралды 38 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН