শুধু দেখানো হচ্ছে
0:03
S… Speaker 1 (3- Anonymous Inner Classes)
So in the last video we passed a new instance of our console printer
0:07
S… Speaker 1 (3- Anonymous Inner Classes)
class to a Greek method As I told you sometimes we don't want to explicitly
0:11
S… Speaker 1 (3- Anonymous Inner Classes)
create a class to implement an interface Perhaps we want to implement an
0:15
S… Speaker 1 (3- Anonymous Inner Classes)
interface only once and use it for a single purpose We don't want to reuse
0:19
S… Speaker 1 (3- Anonymous Inner Classes)
that class.
0:20
S… Speaker 1 (3- Anonymous Inner Classes)
So that's where we use anonymous inner classes So
0:25
S… Speaker 1 (3- Anonymous Inner Classes)
instead of creating a new instance of the console printer class here
0:29
S… Speaker 1 (3- Anonymous Inner Classes)
we can type new
0:31
S… Speaker 2 (3- Anonymous Inner Classes)
printer.
0:31
S… Speaker 1 (3- Anonymous Inner Classes)
So we type the name of the interface and press enter.
0:34
S… Speaker 1 (3- Anonymous Inner Classes)
What we have here is called an anonymous inner
0:38
S… Speaker 1 (3- Anonymous Inner Classes)
class.
0:39
S… Speaker 1 (3- Anonymous Inner Classes)
It's anonymous because this class doesn't have a name.
0:42
S… Speaker 1 (3- Anonymous Inner Classes)
It's just an implementation and we call it an inner class because we're
0:46
S… Speaker 1 (3- Anonymous Inner Classes)
using this inside a method.
0:48
S… Speaker 1 (3- Anonymous Inner Classes)
Okay, so in this class we're
0:52
S… Speaker 1 (3- Anonymous Inner Classes)
implementing the print method.
0:53
S… Speaker 1 (3- Anonymous Inner Classes)
Here we can use a print statement to print this
0:58
S… Speaker 1 (3- Anonymous Inner Classes)
message.
0:58
S… Speaker 1 (3- Anonymous Inner Classes)
Now when we run this program
1:02
S… Speaker 1 (3- Anonymous Inner Classes)
we get the exact same result.
1:03
S… Speaker 1 (3- Anonymous Inner Classes)
So this is how we can use an anonymous inner class.
1:07
S… Speaker 1 (3- Anonymous Inner Classes)
With anonymous inner classes,
1:09
S… Speaker 1 (3- Anonymous Inner Classes)
we can achieve the same result by writing less code.
1:12
S… Speaker 1 (3- Anonymous Inner Classes)
But Java 8 introduced a better and more concise way to achieve
1:16
S… Speaker 1 (3- Anonymous Inner Classes)
the same result.
1:17
S… Speaker 1 (3- Anonymous Inner Classes)
That's called a lambda expression and we're going to look at that next.

এই ট্রান্সক্রিপশনটি AI (স্বয়ংক্রিয় বাক্য সনাক্তকরণ) দ্বারা তৈরি করা হয়েছে। এতে ভুল থাকতে পারে - গুরুত্বপূর্ণ ব্যবহারের জন্য মূল অডিওটির সাথে পরীক্ষা করুন। AI নীতিমালা

❤️ STT.ai ভালবাসো?
সারসংক্ষেপ
এই ট্রান্সক্রিপ্ট এর একটি AI সারসংক্ষেপ তৈরি করতে সারসংক্ষেপ ক্লিক করুন।
সারসংক্ষেপ...
এই ট্রান্সক্রিপ্ট সম্পর্কে AI জিজ্ঞাসা করুন
এই অনুলিপি সম্পর্কে যে কোন প্রশ্ন করুন - এআই সংশ্লিষ্ট অংশ খুঁজে বের করবে এবং উত্তর দেবে।