How To Call A Private Method In Java (And Access From Another Class)
Вставка
- Опубліковано 1 чер 2024
- $1,000 OFF ANY Springboard Tech Bootcamps with my code ALEXLEE. See if you qualify for the JOB GUARANTEE! 👉 bit.ly/3HX970h
In this video, I show you how to call a private method in Java both from the same class and a different class! A private method in Java means that the method can't be used outside of the class it's in, but I found a neat workaround that will let us do that!
I hope you enjoyed this private method Java tutorial!
Full Java Tutorial For Beginners Playlist: • Full Java Course by Al...
Free Tips: bit.ly/3U6HXcb
Disclosure: The Springboard link provided is linked to my affiliate account & supports the channel.
~
Alex Lee
If you’re new to programming but want a career in tech, I HIGHLY RECOMMEND applying to one of Springboard’s online coding bootcamps (use code ALEXLEE for $1,000 off): bit.ly/3HX970h
You'ree backk
So glad your back Alex, love your videos, please keep it up!
Just seen that you are back with more java videos! Welcome back!
Whooow, so nice you back, I couldn't understand Java until I found your videos, I hope to see you around more often. Welcome back
I was just learning this reflection thing earlier xD. This helped me recall stuffs, Thanks
Very helpful as always alex lee
Sir firstly you are reason to improve my skills in java ❤ thank god you are back 🙏 i just finished my bachelor's searching for job in java developer, if i succeed in job one fine day i will meet you sure 😊 Love u sir❤
Kindly make a video on file handling in java...🙏🏻...best wishes for ur channel🎉
Please drop a video on Data structure and algorithms..linkedlist stack queues trees graphs..etc..hope this will help more people!
It's nostalgic that you're back to java, but why do i feel that you're not enthusiastic doing it like before...
Can we just access Create a getter method with constructor. And then we can call getter method. Will this solution work or no ?
the Java god is back!!
Bro can you do some project in java . that will even more helpful
i cant find your java playlist notes?
Bro, what is this?
can you explain difference between throw and throws keywords
in exceptional handling.
Throw keyword used inside the method, Throws used in method...Ex: if x
why u don't use IntelliJ IDEA?
Why would you want to do this?
mostly for testing. If you want to make sure those private methods are working as expected, you can access them from your test file, without setting them to public.
First, and I think I deserve a like from you :>
You got mine
:)