Skip to content

Tag: java

Callable Statement – PostgreSQL – Multiple Out Parameters

We have a stored procedure in a PostgreSQL DB that takes multiple input and multiple out parameters. The procedure call from the PG Admin client works fine when we do the following, call proc1(input1, input2, output1, output2) However, if we try to make this call through a JDBC CallableStatement, we get the b…

For HashMap, is it more efficient to use compute() or put()

I have tried looking around for a while but I can’t find a concrete answer and still am having some trouble understanding exactly what the compute method for HashMap does. The way I understand it at the moment is that compute will allow you to manipulate the value but not set it to a new value (like whe…

Android copy text from edittext

I’m having some trouble whilst following a beginner android dev program. I build an Android App and I have created EditText and Button. My idea, users can put PhoneNumber in EditText, and if they click the Copy button, they can copy shortUrl with PhonNumber that inputed! So, I have create a String with …

Difference between getscaleinstance and scale? (swing java)

I saw a code that used getScaleInstance(x,x) to declare the scale. On the other hand, I also saw that some people used scale to declare the scale. What is the difference? For example: What is the difference between 1 and 2? Answer I have checked the docs for you and have found that: scale() – is a trans…