How do I memorize algorithms? [closed] - java

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I am an AP Computer Science student and I need help memorizing the algorithms.The algorithms are in a revision sheet and they are about abstract classes, interfaces, and polymorphism, so what would be the easiest way to memorize this.Thanks!

Try to understand and learn them.Never try to memorize as you'll sooner forget them

I would suggest don't try to memorize them instead understand the concepts and logics used in any algorithm

Related

Is it important to use labels in java? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
How important is it to use labels in Java? I haven't seen labels used, except in academic books.
I saw them used with jump statements such as break and continue.
You can use labels, but they are considered bad form in general, sort of unrestrained jumping within a method, it makes the code harder to maintain and can introduce bugs if not handled carefully.
As a rule with OO there is usually an easier/better way to achieve things.
In too many years of coding Java I have never used a label.

Should I assign String message to some variable on corner cases and return in at the end of method, or immediately? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
As in the topic name, I wonder what is the best convention
The answer to this question is essentially another question: what makes your code easier to read and maintain?
Martin Fowler, a well-known author and programming guru, suggests a refactoring called Replace Nested Conditional with Guard Clauses.
I am definitely more of the mind to use guard clauses because they usually make the code cleaner and easier to read. However, once in a while there is a scenario where the intent of the code comes through clearer without them.

Airthematic operations of Big real Numbers, 30 to 40 digits long [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Airthematic operation on Big numbers up to 30 to 40 digits long, some of the related material on internet is not really related. any idea how can we do this.
It's right under your nose, in the standard Java API.
You should use BigInteger or BigDecimal for this purpose.

Is it bad to have if statements without else statements? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I was just curious to know if its a bad thing to have an if(){} construct without an else statement in java.
No of course not. There are several times when you only need an if statement without a corresponding else.

How to list all methods in a Java class with regex [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
is there any way to search all methods in Java class with regex?
(public|protected|private|static|\s) +[\w\<\>\[\]]+\s+(\w+) *\([^\)]*\) *(\{?|[^;])
With this you can, but search before ask, because i only have used the search to find this answer ^^.
I think you're looking for reflection - see this tutorial for help. Only through reflection can you access information about loaded classes - unless you're thinking of loading in the .java file and analyzing its text.

Categories