Comment by Federico klez Culloca on Identical implementations of interface...
A bit too abstract IMHO. Maybe the method body should be a default method in the interface. Maybe it belongs in a different class altogether. Maybe something else.
View ArticleComment by Federico klez Culloca on how to install tomcat exe with OpenJDK
Try just before the bin directory
View ArticleComment by Federico klez Culloca on What is more performant Canvas.drawText...
Have you tried actually measuring the difference? Also, are you having an actual performance issue or are you optimizing for a case that may not be necessary?
View ArticleComment by Federico klez Culloca on How to convert a raw pdf file string to...
testPDf = testPDf.replaceAll("\n", ""); are you sure you should be doing this? As far as I know newlines in a pdf file are significant.
View ArticleComment by Federico klez Culloca on Guys I am a beginner in Java, I did not...
Hello and welcome. You forgot to ask a question.
View ArticleComment by Federico klez Culloca on Which ojdbc driver should I use to...
Do you have any reason not to use the latest version?
View ArticleComment by Federico klez Culloca on How to get my in.nextdouble in java to code?
Plenty of errors there. It's nextDouble(), not nextdouble(). Case matters. Also you're missing parentheses in some instances. And while(!done) should be followed by a semicolon, not by another block of...
View ArticleComment by Federico klez Culloca on My method returns a String line but not...
Please provide a minimal reproducible example.
View ArticleAnswer by Federico klez Culloca for Does method Optional.of do a type...
Because in your second example Optional.of() expects an X and new Y()is an X.But, as you state, an Optional<Y> is not an Optional<X>, hence the first example doesn't work.More generally a...
View ArticleComment by Federico klez Culloca on How can I use a variable outside while...
Declare it before the loop. Judging by the error you're doing that already (even if you're not showing it) but you're re-declaring it inside the loop.
View ArticleComment by Federico klez Culloca on What userAgent do I need for the method...
Hello and welcome. Your code is text. Please share it as such, not as pictures.
View ArticleComment by Federico klez Culloca on Why do I keep getting the "cannot find...
How are you compling this?
View ArticleComment by Federico klez Culloca on Jython: syntax check available?
May I ask why you need to check the python syntax before execution? Can't you just check the code separately before adding it to your program? Why is letting exec just fail not ok?
View ArticleComment by Federico klez Culloca on Boolean.FALSE: When should it be used?
Yes, it makes more sense now. Thanks for editing.
View ArticleComment by Federico klez Culloca on My method returns a String line, but not...
Please provide a minimal reproducible example.
View ArticleComment by Federico klez Culloca on Why will orElseThrow() not compile?
@julaine oops, my bad, I thought those were stackoverflow links. Should have been more attentive.
View ArticleComment by Federico klez Culloca on Casting int to double gives 0.0
Works fine on my computer. How are you testing this?
View ArticleComment by Federico klez Culloca on How to sort an arraylist of objects that...
Implement a comparator that 1) checks whether both inputs are numbers; 2) if they are parse them as numbers and sort them as such; 3) if they are not compare them by natural string order
View ArticleComment by Federico klez Culloca on How can common resusable code be written?
"inheritance is so dangerous and must be used carefully" that's a tad overblown. True, inheritance can cause complexity and composition should be preferred, but calling it "dangerous" is a bit of an...
View ArticleComment by Federico klez Culloca on Can I make a non-genericised...
Maybe implementing ResponseEvaluator<Object>? I'm not sure that would work since I'm not sure where/how this will be used, but it's worth a try.
View Article