New java Methods in the Tools | Sololearn: Learn to code for FREE!

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

10/17/2019 8:39:11 PM

Kiuziu 💘 Berlin

7 Answers

New Answer

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

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

0

Manuel Prochnow, thanks to tip, .toCharArray() is good classic way, I tried optimise your example and I got bubble sort

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

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.

0

Ok. Thanks for the details. 👍😊

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;