Java Tutorial: Access modifiers, getters & setters in Java

preview_player
Показать описание
Java access modifiers: In this video, we will see how to use access modifiers in Java. Java offers public, default, private and protected access modifiers. We will also see how to use getters and setters!

Best Hindi Videos For Learning Programming:

►C Language Complete Course In Hindi -

►JavaScript Complete Course In Hindi -

►Django Complete Course In Hindi -

Follow Me On Social Media
Рекомендации по теме
Комментарии
Автор

You're are really a great teacher. Most of the courses are expensive to learn which many people couldn't afford, but you're the only one man army who can teach us almost everything. Keep it up, keep doing this great work. God bless you.

noone.
Автор

You making the future of 🇮🇳🇮🇳🇮🇳🇮🇳 better I am sure you are rewarded as BHARAT RATNA in future

privicyismyth
Автор

Your contribution is just wow.
It is a evolution of coding in India

NoobCoder
Автор

class Circle {
private int radius;
private float area;
private float perimeter;

public void setradius(int r){
radius = r;
}
public void checkarea(float a){
area=3.14f*radius*radius;
if(area==a)
{
System.out.println("Correct Area.");
}
else{
System.out.println("Incorrect Area.");
}
}
public void checkperimeter(float p){
perimeter = 2*3.14f*radius;
if(perimeter==p)
{
System.out.println("Correct Perimeter.");
}
else{
System.out.println("Incorrect Perimeter.");
}
}
}
public class roughjava{
public static void main(String[] args){
Circle ci= new Circle();
ci.setradius(3);
ci.checkarea(28.26f);
ci.checkperimeter(18.84f);
}
}

ritikchaudhary
Автор

Dear Harry sometimes i thing u are out of this world 'cause u made my learning so easy that even my school teachers can't .

Greed_grayson
Автор

Sir really nice timing and I was sitting ideal and thinking about java and got the notification

.arkodevmukherjee
Автор

Harry bhai I cant thank you enough. I am doing courses for Java fullstacks. Today they taught us the topic for 3 hours and I couldnt figure out why we use this thing. My professor replied to me that its used to access private variables. Bhai apne itna ache se explain kiya k why exactly we need to use it. We need teachers like you. I have learnt so much from you and I cant thank you enough. I cant even pay you back. I always like your video first before watching it. You are Great Brother.

kartikparmar
Автор

Finally!!
End of 40th video!!
Couldn't finish it last night but at now the milestone is passed!!
Tomorrow shall be for 50th!!

Jai Hind!!
Jai Jagannath!!

biswajeet
Автор

Hi Harry,
My name is V.Nandini. A Huge Fan of you from Telangana. I had started learning java from many sites and other youtube videos, but not at all satisfied and I had stopped learning them in between. To speak honestly, your channel and you are brilliant. It had solved many of my doubts. I had became efficient after doin many of your exercises, practise sets and following your notes mainly. I had accessed your entire java playlist too. Thankyou very much Harry!!!!
Answer

class Circle{
private int radius;
public int getRadius(){
return radius;
}
public int setRadius(int r){
return radius=r;
}
public float area(){
return 3.14f*(radius*radius);
}
}
public class Main{
public static void main(String[] args) {
Circle cr = new Circle();
cr.setRadius(5);



}
}

nandinivangaveti
Автор

Bhai aap brilliant work kar rahe ho, audience harry bhai itna hard work kar rahe hain, plz yaar inko support karo❤️❤️🙏🙏.Bhai maine aapka sabse pahle 2:30 hours wala course complete kar liya ab iska baari hai. Love u bhai from jharkhand, har koi online paise lete hain koi v language sikhane k liye aur aap poor k liye sab kuch free kar diye ho wooo

sadashish
Автор

Your teaching is a gift to this Generation !! thanks alot sir.

socialogic
Автор

Harry bhai u literally deservs bharat ratn.... u teach us from 'our' perspective of seeing at logic and code n thats really rare. M really thankful to u for creating such important stuffs.
Bdw Elon Musk ka joke wad really funny that keeps us engaged and entertained throughout 👍👍👍👍

humaali
Автор

Thanks a lot of this free tutorials 😊🌼 My God Bless U Harry Bhaii...

bholekdiwanee
Автор

I was thinking of java when I got the notification xD yayyyy

RohanDasRD
Автор

Thank you so much for your amazing videos... It feels like Concept on OOPs is clear after watching these tutorials of urs.😊

DelicaciousTales
Автор

Getter and setter are very important in Android development for example getText(), setImageResource() etc

reloadingbrains
Автор

Springboot tk course le jaana bro plzzzz👉👉🔥🔥🔥🔥❤️❤️ haath jod rha hun....Plzzz springboot stack java ...Kyunki mere jaise bahut se log honge jo 40000 ya 50000 paisa ni laa payenge 🙄🙄🔥 kaash ye sach ho jaye ki harry bhai Springboot tk sikha de....Plzzz support kro....Please❤️❤️❤️❤️❤️❤️

AnkitKumar-pmvj
Автор

i really got this concept and loved the soundtrack at the end of the video.

manalikarankal
Автор

Man, this Guy really needs a big hand. He is just giving his best to make us learn coding.

buddhadebbairagi
Автор

Next Roadmap Please Competitive Programing 🙏🙏🙏🙏🙏

oyepuru