private tag

6 questions


1 answers
381 views
0
[Kotlin] Private question.

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...

1 years ago

1 answers
55 views
0
How do I read elements that are private in Java?

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...


1 answers
106 views
0
Accessing public static variables inside a class declared private

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...

1 years ago

1 answers
100 views
0
What object is _(underlined) before the name?

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?


1 answers
79 views
0
Is there a private variable in Python's class?

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...

1 years ago

1 answers
91 views
0
java) Can private access restrictors be accessed through return?

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...

1 years ago

© 2024 OneMinuteCode. All rights reserved.