New java Methods in the Tools | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

New java Methods in the Tools

In this discussion you will find helpful Java methods. If you want, please add some nice methods. the link to kiuziu's tools: https://code.sololearn.com/c5rREujmvxsU/#java be happy be using this ... regards kiuziu

17th Oct 2019, 8:39 PM
Kiuziu 💘 Berlin
Kiuziu 💘 Berlin - avatar
7 Answers
0
in comment you write about Integer, Long types but you use int, long - it is not the same types. for repeat() is better to use StringBuilder. btw there is "-".repeat(20) in Java 11
18th Oct 2019, 7:07 AM
zemiak
0
zemiak The randomOfAny method works only with non primitive data types. Long works long don't works. And so on... If you mean any other please write Details. Thanks. Please take a look at my version of 'manualy' string sort. https://code.sololearn.com/c2blLNdBrS5L/?ref=app What do you think of the code? Regards kiuziu
19th Oct 2019, 6:46 PM
Kiuziu 💘 Berlin
Kiuziu 💘 Berlin - avatar
0
Manuel Prochnow, thanks to tip, .toCharArray() is good classic way, I tried optimise your example and I got bubble sort
20th Oct 2019, 12:19 PM
zemiak
0
zemiak String.valueOf(char[]) Nice too! Do you know 'pojo java' ? I think it's mean 'poor java' ... is'nt it? This used only 'basic' java without imports I mean. What do yout know? Regards kiuziu
20th Oct 2019, 7:14 PM
Kiuziu 💘 Berlin
Kiuziu 💘 Berlin - avatar
0
I know only POJO object, it is term usually used in java EE Plain Old Java Object (POJO) . is an ordinary Java object (class) what is not POJO . if bound by special restriction .. if follow of the major Java object models, conventions, or frameworks . if requiring class path .. if extend prespecified classes, interfaces, annotations .. if need complicated object frameworks what is still POJO: if it accepts these requests: . is serializable, . has a no-argument constructor . uses getter and setter methods, equals(), hashCode() . follow a simple naming convention of get/set methods.
24th Oct 2019, 6:22 AM
zemiak
0
Ok. Thanks for the details. 👍😊
24th Oct 2019, 8:19 PM
Kiuziu 💘 Berlin
Kiuziu 💘 Berlin - avatar
0
> "If you mean any other please write Details. " I mean these places: Long -> long * PARAMETER a Long type number. public static boolean isPrime(long number){ -- * PARMETER an Long value. public static ArrayList<Long> pfz(long number){ -- Integer -> int * PARMETER 2 or more Integers or an Array of Integers * RETURN the GCD as an Integer public static int gcd(int... n){ int a .. return a;
24th Oct 2019, 9:39 PM
zemiak