4
Contributors
4
Replies
20
Views
3 Years
Discussion Span
Last Post by C-Money
0

Cant figure out how to show my current code in here......try to follow what it says but alas it doesnt like me...LOL

1

sometimes existing code is repeated in several methods. that can be turned into a separate method, which is called where it is currently repeated.

simple refactoring, or adding some basic methods: equals, toString, hashcode, ...

0

If you want 5 methods in one class, then one way to do it is, let's say for example, you create an array named A, and it's numbers, or characters, are in random order. Then, in the main class, you create a reference method, such as
insertionSort(A), selectionsort(A), etc.

Then, outside your main class, but in the overall program class, you create another reference method and parameter, such as public static insertionSort(int[] x), and repeat.

Votes + Comments
total nonsense
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.