6 questions
private class PP { private var i = 1 private fun privateF() { i += 1 } fun access() { privateF() }}class OC { fun test() { val pc = PP() }}Here, why is it possible to create an object witho...
I made the access restrictor of one of the elements private to design the class elements private. How can I get the value of stubIWant from the code below?class IWasDesignedPoorly { private int stuffI...
private class Example { public static final PI = 3.14; ...}If there is a code configuration like above, is PI accessible from the outside?Classers restrict access from the outside to private, but PI a...
What's the difference between one underlined object name and two underlined object names?Why are you using it?Are functions and variables used in the same sense?
I'm using Java and learning Python by reading Bruce Eckels' Python 3 Patterns, Recipes and IdiomsWhile reading about the class, Python found that just using it in the constructor creates variables wit...
class A { private String name; public void getName() { return name; }}If this class exists, the member name is set to privatePrivate can only be accessed within the class, right?However, if you return...
© 2024 OneMinuteCode. All rights reserved.