In Java, private means private. In Python, it means: “I trust you not to look.” I was exploring encapsulation and discovered something interesting. In Java, access is enforced. In Python, it’s… negotiated. A double underscore (__attr) doesn’t truly hide anything. It just renames it. Which means: You *can* still access it — if you know how. That realization changed how I think about class design. Java protects the code. Python trusts the developer. Two different philosophies. Which one do you prefer? 👇 Curious to hear your perspective #Python #Java #OOP #SoftwareEngineering #LearningInPublic
Iman Sorati Ashtiani’s Post
More Relevant Posts
-
Did you know Python is actually older than Java? Yes, read that again. Python’s clean, indentation-driven syntax makes it feel like a modern language, but its first public release was all the way back in 1991. Java, on the other hand, didn’t see its first public release until 1995. Modern isn’t always new, sometimes it’s the ideas that were just ahead of their time. #Java #Python
To view or add a comment, sign in
-
Hit 5⭐ in Java & Python on HackerRank. Key takeaways from the journey: • Improved problem-solving and logical thinking • Focused on writing clean and efficient code • Got hands-on with arrays, strings, and recursion • Learned the importance of time & space complexity • Practiced consistency and pattern recognition Next step: deeper DSA and applying these skills to real-world projects. #Java #Python #DSA #ProblemSolving #CodingJourney #HackerRank
To view or add a comment, sign in
-
-
Switching from Python to Java: Coming from a Python-heavy background, working with Java has been a real shift in perspective. In Python, a lot is taken care of for you through powerful high-level abstractions. You can move quickly, write less code, and focus on solving problems. But Java? It makes you slow down in a good way. You start paying attention to details you might have overlooked before: type definitions, structure, and the mechanics behind what your code is actually doing. It demands more explicitness, more discipline, and a deeper level of understanding. And that’s the beauty of it. Different languages, different strengths, but stepping outside your comfort zone is where real growth happens. https://lnkd.in/deNbabM5 #Java #Python #SoftwareEngineering #CodingJourney #LearningToCode
To view or add a comment, sign in
-
-
I've clearly not been paying attention to Scala lately. Only found out yesterday that Scala 3 supports syntax that makes it that much easier for Python developers to pick up (curly braces now optional, amongst other things). If you're a Python dev, check it out: you get a much, much faster runtime (the JVM), and a rich ecosystem of libraries (all Java libraries are interoperable with Scala). https://lnkd.in/gsTf5m_B
To view or add a comment, sign in
-
-
#TIL There is no real polymorphism in Python OOP In Python, method calls are not resolved by strict type like Java or C++. They are resolved at runtime, based on object behavior, not class hierarchy. What we call polymorphism in Python is actually: ✔ Duck Typing ✔ Dynamic dispatch ✔ Flexible method resolution If an object acts like it has the method, Python doesn’t care what class it belongs to. “If it quacks like a duck, it’s a duck.” This flexibility is powerful. But it also means Python OOP works very differently from classical OOP languages. Understanding this makes you a better Python engineer, not a confused one. #Python #OOP #SoftwareEngineering #Programming #PythonDev #CleanCode #DeveloperMindset
To view or add a comment, sign in
-
Day 34 of my python learning journey Today’s Python topic: Abstract Class & Interface 🐍 🚀👩💻 1. Abstract Class→ A class we cannot make objects from. It’s only a plan. We use `ABC` and `@abstractmethod`. Child class must complete the empty methods. Ex: `class Shape(ABC): @abstractmethod def area(self): pass` 2. Interface→ Python has no separate `interface` keyword like Java. But we make it using an abstract class where _all methods are abstract_. It just tells what to do, not how to do it. Main idea:Abstract class = partial plan. Interface = full plan with only rules. Both help us write clean code and force every child class to follow the same structure. Special thanks to the CEO G.R NARENDRA REDDY Sir for constant guidance and motivation. #Python #OOP #Abstraction #Interface
To view or add a comment, sign in
-
-
I used to hate Python. Coming from C++ and Java, it felt fragile, inconsistent, and way too forgiving. Indentation defines scope, types are optional, performance isn’t great… and don’t get me started on packaging. The interesting part is: most of those things are still true. In today’s video, I talk about why I still use Python anyway, and the bigger lesson behind it. At some point, you realize it’s not about finding the “best” language. It’s about understanding trade-offs and choosing the right tool for the problem you’re solving. If you want to grow as a developer, that shift in thinking matters much more than the language you use. 👉 Watch here: https://lnkd.in/eJtP_jHF. #python #softwareengineering #programming #developers #careergrowth
To view or add a comment, sign in
-
-
🚀 Python Learning Journey – Day 3 📅 13/03/2026 Continuing my Python learning journey at Global Quest Technologies, today’s session focused on exploring Python implementations and understanding how it compares with Java. 🔍 Topics Covered: 🔹 Flavours of Python 🔹 Differences between Python and Java 💡 Key Takeaways: ✔️ Learned about different Python implementations: • CPython – Default and most widely used • Jython – Runs on the Java Virtual Machine (JVM) • IronPython – Works with the .NET framework • PyPy – Focused on performance using JIT compilation. ✔️ Understood key differences between Python and Java : 🔹 Python is interpreted and dynamically typed, while Java is compiled and statically typed 🔹 Python emphasizes simplicity and readability, whereas Java focuses on structure and performance 🔹 Python uses indentation, while Java uses braces {} 🔹 Java generally offers faster execution, while Python provides ease of development and debugging. This session helped me gain clarity on how Python works across different environments and how it stands in comparison with Java in real-world applications. Grateful for the continuous guidance from Global Quest Technologies and G.R NARENDRA REDDY Sir. Looking forward to applying these concepts and exploring more advanced topics ahead! #Python #LearningJourney #CorePython #Programming #Java #TechSkills #Upskilling #FullStackDevelopment 🚀
To view or add a comment, sign in
-
-
𝗨𝗻𝗱𝗲𝗿𝘀𝘁𝗮𝗻𝗱𝗶𝗻𝗴 𝗥𝗲𝗰𝘂𝗿𝘀𝗶𝗼𝗻 You want to learn about recursion. Here are some simple examples to help you understand it. - Reverse a number: You can use recursion to reverse a number. - Count digits: Recursion can also be used to count the digits in a number. - Even or odd: You can use recursion to check if a number is even or odd. - Sum of digits: Recursion can be used to calculate the sum of digits in a number. These examples will help you learn about recursion. You can practice them in different programming languages like Python, Java, and JavaScript. Source: https://lnkd.in/gMgTSgbs
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
One more thought: In Python, encapsulation is about communication. In Java, it’s about restriction. That difference is subtle… but powerful.