Tagged Questions
1
vote
1answer
113 views
Use of # in answers/documentation when referring to methods of a class
When looking through Java documentation or answers for Stack Overflow / programming forum questions, I often see people referring to methods like String#format, Object#clone etc, rather than ...
0
votes
2answers
1k views
When to use functions vs methods?
So I know that methods are more OOP than functions.
I was wondering if someone could show me an example of a function and a method and explain the differences between methods and functions to me?
...
-3
votes
2answers
2k views
Java: The best way to learn it when MOOCs and books are not enough? [closed]
This topic was taken from Stack Overflow, but it was put on-hold due to Opinion-based question. So I moved it to here.
I've had some great troubles with my homework exercises and I've used ...
0
votes
2answers
192 views
Overriding - Access to Members with Reference Reassignment
I have recently been moving through a couple of books in order to teach myself Java and have, fortunately, mostly due to luck, encountered very few difficulties. That has just changed.
I read a ...
4
votes
2answers
937 views
Naming methods that do the same thing but return different types
Let's assume that I'm extending a graphical file chooser class (JFileChooser).
This class has methods which display the file chooser dialog and return a status signature in the form of an int: ...
7
votes
6answers
1k views
Prefer class members or passing arguments between internal methods?
Suppose within the private portion of a class there is a value which is utilized by multiple private methods. Do people prefer having this defined as a member variable for the class or passing it as ...
5
votes
4answers
811 views
What is a good pattern for combined caching and reinitialization?
I have a situation where I have three requirements:
Lazy initialization - don't create the collection until asked for it
Caching - keep the collection in memory on the object
Reinitialization - be ...