MMMayank Mudgalinmayank1728.hashnode.dev·Jan 29, 2024 · 2 min readHow to apply specific Sortingvector<int> salary = {100, 34, 90, 1, 14, 65, 22, 21, 90}; Q: Sort this array in NON-decreasing order.A: using the in-built sort function we can write // we need to include bits/stdc++ library sort(v.begin(), v.end()); // {1, 14, 21, 22, 34, 65, 90,...00
MMMayank Mudgalinmayank1728.hashnode.dev·Nov 3, 2023 · 3 min readObject Oriented Programming in Java - Part 5Q: What is Polymorphism ?A: Poly means "many" and morphism means "form". Polymorphism means "Many forms". Formal definition, Data to be processed in more than 1 form. Note: Java DOESN'T support operator overloading. Q: What are 2 types of Polymorphis...00
MMMayank Mudgalinmayank1728.hashnode.dev·Nov 1, 2023 · 4 min readObject Oriented Programming in Java - Part 3Q: What are 4 pillars of OOP ?A: Inheritance, Polymorphism, Encapsulation and Abstraction. Q: What is inheritance and why do we need it?A: What is the first picture that comes to your mind when I say "Alcohol Beverage". It could be anything like vodk...00
MMMayank Mudgalinmayank1728.hashnode.dev·Oct 28, 2023 · 4 min readObject Oriented Programming in Java- Part 2Q: What are packages and why do we need them ?A: Provides organization and structure to code. You can have classes with same name in different and avoid collision. Lastly access control and modularity. Q: How to export import and create a package ?A:...00
MMMayank Mudgalinmayank1728.hashnode.dev·Oct 27, 2023 · 5 min readObject Oriented Programming in Java - Part 1Q: What are classes ?A: Classes are logical construct AKA Blueprint. Similar to blueprint/Architecture/Map of a house or car etc. Q: What are Objects ?A: Objects are physical reality AKA living entities. Analogous to ACTUAL car or House. Q: What happ...00