Java method chaining ⛓️
HTML-код
- Опубликовано: 15 ноя 2024
- Java method chaining
#Java #method #chaining
public class Main {
public static void main(String[] args) {
// method chaining = a common syntax for invoking multiple method calls in OOP
// condense code into less lines
String name = " bro";
//name = name.concat(" code ");
//name = name.toUpperCase();
//name = name.trim();
name = name.concat("code").toUpperCase().trim();
System.out.println(name);
}
}
public class Main {
public static void main(String[] args) {
// method chaining = a common syntax for invoking multiple method calls in OOP
// condense code into less lines
String name = " bro";
//name = name.concat(" code ");
//name = name.toUpperCase();
//name = name.trim();
name = name.concat("code").toUpperCase().trim();
System.out.println(name);
}
}
This channel is really underrated ,keep making those coding tutorials ,lots of love
Amazing concept
easy and clear explanation, thanks!
I'm currently here right now because I discovered that this is one of the topics not covered in the all-in-one version of the video. I think 19 topics are missing there.
I'm about to finish that 12 hour version tutorial. And starting to grasp and understand some codes, but still need my notes as I try to setup my own coding.
have you made notes for it all?
Love your course, bro. BIG BIG LOVE
Loved it
Thank you
Thanks
Nice
great
Thank you for your great explanation.
But by the chained version of the code, does it trim the string first, then touppercase, then concat or is it backwards?
thank you
perfect java teacher🤩
Thanks for this
thanks bro
Greatly appreciated
Great video
you're the bro
hey! thx for video :) one question: methods are executed from left to right?
Thanks bro
Nice one bro
hi, how to limit method chain to some perticular function ? returning this will give all method access, and i am trying to make a routing package where i need to return a chain of method like router.get() here i only want to return get, post and other method but i have many methods in class that all are showing up, i also have applyMiddleware() method that i only want after method is selected but it is showing while accessing router.* anything
bowing deep
Can you make a 2D random terrain generator
I'd love to, but it might be a little advanced for us at this level
@@BroCodez can do it for me please
on vs aime buddyt
comment
Nice
Great video